import{h as k,g as E,l as e,B as a,v as l,y as o,z as m,A as d,w as i,C as r,J as f,G as v}from"./index-CQ7DJRNL.js";import{B as h}from"./badge--QyUEUd_.js";import{T as C,a as A,b as p,c as u,C as x}from"./tabs-CAz0okm4.js";import{N as T,A as S,F as I}from"./Footer-CLq6MgBW.js";import{C as q}from"./code-Ff8n7vTX.js";import{K as b}from"./key-DdLd2n4A.js";import{B as R}from"./book-open-BGwOP_6z.js";import{Z as G}from"./zap-14ipFZrY.js";import{D as w}from"./database-BZl-0QP4.js";import{E as z}from"./external-link-rseT59Z9.js";import{L as _}from"./lock-BORxjE9s.js";import"./index-BHeDRWJP.js";import"./input-BY7_I9bP.js";import"./globe-DvNuoQI8.js";import"./trending-up-BvrzuekH.js";/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D=k("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),X=()=>{const[n,g]=E.useState(null),c=(s,j)=>{navigator.clipboard.writeText(s),g(j),setTimeout(()=>g(null),2e3)},y=[{method:"GET",path:"/api/v1/emails",description:"Retrieve all emails",auth:"Required",params:["page","limit","status"]},{method:"POST",path:"/api/v1/emails",description:"Send a new email",auth:"Required",params:["to","subject","body","template_id"]},{method:"GET",path:"/api/v1/emails/{id}",description:"Get email details",auth:"Required",params:["id"]},{method:"PUT",path:"/api/v1/emails/{id}",description:"Update email",auth:"Required",params:["id","subject","body"]},{method:"DELETE",path:"/api/v1/emails/{id}",description:"Delete email",auth:"Required",params:["id"]},{method:"GET",path:"/api/v1/templates",description:"List email templates",auth:"Required",params:["category","page","limit"]},{method:"POST",path:"/api/v1/templates",description:"Create new template",auth:"Required",params:["name","subject","body","category"]},{method:"GET",path:"/api/v1/analytics",description:"Get email analytics",auth:"Required",params:["start_date","end_date","metrics"]}],t={authentication:`// Get your API key from the dashboard
const API_KEY = 'your_api_key_here';

// Include in headers
const headers = {
  'Authorization': 'Bearer ' + API_KEY,
  'Content-Type': 'application/json'
};`,sendEmail:`// Send a simple email
const response = await fetch('https://api.flashcore.com/v1/emails', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    to: 'recipient@example.com',
    subject: 'Hello from FlashCore',
    body: '<h1>Welcome!</h1><p>This is a test email.</p>',
    template_id: 'welcome_template'
  })
});

const result = await response.json();
console.log(result);`,getEmails:`// Retrieve emails with pagination
const response = await fetch('https://api.flashcore.com/v1/emails?page=1&limit=10&status=sent', {
  headers: {
    'Authorization': 'Bearer ' + API_KEY
  }
});

const emails = await response.json();
console.log(emails.data);`,webhooks:`// Set up webhook endpoint
app.post('/webhook', (req, res) => {
  const { event, data } = req.body;
  
  switch(event) {
    case 'email.sent':
      console.log('Email sent:', data);
      break;
    case 'email.delivered':
      console.log('Email delivered:', data);
      break;
    case 'email.opened':
      console.log('Email opened:', data);
      break;
  }
  
  res.status(200).json({ received: true });
});`},P=[{name:"JavaScript/Node.js",version:"v2.1.0",install:"npm install @flashcore/api",color:"from-yellow-500 to-orange-500"},{name:"Python",version:"v1.8.0",install:"pip install flashcore-api",color:"from-blue-500 to-purple-500"},{name:"PHP",version:"v1.5.0",install:"composer require flashcore/api",color:"from-purple-500 to-pink-500"},{name:"Ruby",version:"v1.3.0",install:"gem install flashcore-api",color:"from-red-500 to-pink-500"}];return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(T,{}),e.jsx("section",{className:"container mx-auto px-4 py-12 md:py-20 text-center",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs(h,{variant:"secondary",className:"mb-4",children:[e.jsx(q,{className:"w-3 h-3 mr-1"}),"API Documentation"]}),e.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-6 bg-gradient-to-r from-flashcore-purple to-flashcore-green bg-clip-text text-transparent",children:"API Reference"}),e.jsx("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Integrate FlashCore into your applications with our powerful REST API. Send emails, manage templates, and track analytics programmatically."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[e.jsxs(a,{size:"lg",className:"bg-gradient-to-r from-flashcore-purple to-flashcore-green",children:[e.jsx(b,{className:"w-4 h-4 mr-2"}),"Get API Key"]}),e.jsxs(a,{size:"lg",variant:"outline",children:[e.jsx(R,{className:"w-4 h-4 mr-2"}),"View SDKs"]})]})]})}),e.jsx("section",{className:"container mx-auto px-4 py-12 md:py-20",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4",children:"Quick Start"}),e.jsx("p",{className:"text-muted-foreground",children:"Get up and running with FlashCore API in minutes."})]}),e.jsxs(C,{defaultValue:"authentication",className:"w-full",children:[e.jsxs(A,{className:"grid w-full grid-cols-4",children:[e.jsx(p,{value:"authentication",children:"Authentication"}),e.jsx(p,{value:"send-email",children:"Send Email"}),e.jsx(p,{value:"get-emails",children:"Get Emails"}),e.jsx(p,{value:"webhooks",children:"Webhooks"})]}),e.jsx(u,{value:"authentication",className:"mt-6",children:e.jsxs(l,{children:[e.jsxs(o,{children:[e.jsxs(m,{className:"flex items-center",children:[e.jsx(b,{className:"w-5 h-5 mr-2"}),"API Authentication"]}),e.jsx(d,{children:"All API requests require authentication using your API key."})]}),e.jsx(i,{children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"bg-muted p-4 rounded-lg overflow-x-auto",children:e.jsx("code",{className:"text-sm",children:t.authentication})}),e.jsx(a,{size:"sm",variant:"outline",className:"absolute top-2 right-2",onClick:()=>c(t.authentication,"auth"),children:n==="auth"?e.jsx(r,{className:"w-4 h-4"}):e.jsx(x,{className:"w-4 h-4"})})]})})]})}),e.jsx(u,{value:"send-email",className:"mt-6",children:e.jsxs(l,{children:[e.jsxs(o,{children:[e.jsxs(m,{className:"flex items-center",children:[e.jsx(G,{className:"w-5 h-5 mr-2"}),"Send an Email"]}),e.jsx(d,{children:"Send emails using the API with support for templates and custom content."})]}),e.jsx(i,{children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"bg-muted p-4 rounded-lg overflow-x-auto",children:e.jsx("code",{className:"text-sm",children:t.sendEmail})}),e.jsx(a,{size:"sm",variant:"outline",className:"absolute top-2 right-2",onClick:()=>c(t.sendEmail,"send"),children:n==="send"?e.jsx(r,{className:"w-4 h-4"}):e.jsx(x,{className:"w-4 h-4"})})]})})]})}),e.jsx(u,{value:"get-emails",className:"mt-6",children:e.jsxs(l,{children:[e.jsxs(o,{children:[e.jsxs(m,{className:"flex items-center",children:[e.jsx(w,{className:"w-5 h-5 mr-2"}),"Retrieve Emails"]}),e.jsx(d,{children:"Fetch emails with pagination and filtering options."})]}),e.jsx(i,{children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"bg-muted p-4 rounded-lg overflow-x-auto",children:e.jsx("code",{className:"text-sm",children:t.getEmails})}),e.jsx(a,{size:"sm",variant:"outline",className:"absolute top-2 right-2",onClick:()=>c(t.getEmails,"get"),children:n==="get"?e.jsx(r,{className:"w-4 h-4"}):e.jsx(x,{className:"w-4 h-4"})})]})})]})}),e.jsx(u,{value:"webhooks",className:"mt-6",children:e.jsxs(l,{children:[e.jsxs(o,{children:[e.jsxs(m,{className:"flex items-center",children:[e.jsx(f,{className:"w-5 h-5 mr-2"}),"Webhooks"]}),e.jsx(d,{children:"Receive real-time notifications about email events."})]}),e.jsx(i,{children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"bg-muted p-4 rounded-lg overflow-x-auto",children:e.jsx("code",{className:"text-sm",children:t.webhooks})}),e.jsx(a,{size:"sm",variant:"outline",className:"absolute top-2 right-2",onClick:()=>c(t.webhooks,"webhook"),children:n==="webhook"?e.jsx(r,{className:"w-4 h-4"}):e.jsx(x,{className:"w-4 h-4"})})]})})]})})]})]})}),e.jsx("section",{className:"container mx-auto px-4 py-12 md:py-20 bg-muted/20",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4",children:"Official SDKs"}),e.jsx("p",{className:"text-muted-foreground",children:"Use our official SDKs for faster integration and better developer experience."})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:P.map(s=>e.jsxs(l,{className:"hover:shadow-lg transition-shadow",children:[e.jsxs(o,{children:[e.jsx("div",{className:`w-12 h-12 bg-gradient-to-r ${s.color} rounded-lg flex items-center justify-center mb-4`,children:e.jsx(D,{className:"w-6 h-6 text-white"})}),e.jsx(m,{className:"text-lg",children:s.name}),e.jsxs(d,{children:["Version ",s.version]})]}),e.jsx(i,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"bg-background p-3 rounded text-xs overflow-x-auto",children:e.jsx("code",{children:s.install})}),e.jsx(a,{size:"sm",variant:"outline",className:"absolute top-1 right-1 h-6 w-6 p-0",onClick:()=>c(s.install,s.name),children:n===s.name?e.jsx(r,{className:"w-3 h-3"}):e.jsx(x,{className:"w-3 h-3"})})]}),e.jsxs(a,{variant:"outline",size:"sm",className:"w-full",children:[e.jsx(z,{className:"w-4 h-4 mr-2"}),"Documentation"]})]})})]},s.name))})]})}),e.jsx("section",{className:"container mx-auto px-4 py-12 md:py-20",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4",children:"API Endpoints"}),e.jsx("p",{className:"text-muted-foreground",children:"Complete reference of all available API endpoints."})]}),e.jsx("div",{className:"space-y-4",children:y.map((s,j)=>e.jsx(l,{className:"hover:shadow-md transition-shadow",children:e.jsxs(i,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(h,{variant:s.method==="GET"?"default":s.method==="POST"?"secondary":s.method==="PUT"?"outline":"destructive",className:"w-16 text-center",children:s.method}),e.jsx("div",{children:e.jsx("code",{className:"text-sm md:text-base font-mono bg-muted px-2 py-1 rounded",children:s.path})})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:s.description}),e.jsx(h,{variant:"outline",className:"text-xs",children:s.auth})]})]}),s.params.length>0&&e.jsxs("div",{className:"mt-4 pt-4 border-t",children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:"Parameters:"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:s.params.map(N=>e.jsx(h,{variant:"secondary",className:"text-xs",children:N},N))})]})]})},j))})]})}),e.jsx("section",{className:"container mx-auto px-4 py-12 md:py-20 bg-muted/20",children:e.jsx("div",{className:"max-w-4xl mx-auto",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 md:gap-12",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4 md:mb-6",children:"Rate Limits"}),e.jsx("p",{className:"text-base md:text-lg text-muted-foreground mb-4 md:mb-6",children:"We implement rate limiting to ensure fair usage and system stability."}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 bg-background rounded-lg",children:[e.jsx("span",{className:"font-medium",children:"Free Plan"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"1,000 requests/hour"})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-background rounded-lg",children:[e.jsx("span",{className:"font-medium",children:"Pro Plan"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"10,000 requests/hour"})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-background rounded-lg",children:[e.jsx("span",{className:"font-medium",children:"Enterprise"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"100,000 requests/hour"})]})]})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4 md:mb-6",children:"Security"}),e.jsx("p",{className:"text-base md:text-lg text-muted-foreground mb-4 md:mb-6",children:"Your data security is our top priority. All API communications are encrypted and secure."}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(_,{className:"w-5 h-5 text-green-500 mr-3"}),e.jsx("span",{className:"text-sm md:text-base",children:"HTTPS encryption for all requests"})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(f,{className:"w-5 h-5 text-green-500 mr-3"}),e.jsx("span",{className:"text-sm md:text-base",children:"API keys are encrypted and secure"})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(r,{className:"w-5 h-5 text-green-500 mr-3"}),e.jsx("span",{className:"text-sm md:text-base",children:"SOC 2 Type II compliance"})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(w,{className:"w-5 h-5 text-green-500 mr-3"}),e.jsx("span",{className:"text-sm md:text-base",children:"GDPR compliant data handling"})]})]})]})]})})}),e.jsx("section",{className:"container mx-auto px-4 py-12 md:py-20",children:e.jsxs("div",{className:"bg-gradient-to-r from-flashcore-purple to-flashcore-green rounded-2xl p-6 md:p-8 lg:p-12 text-center text-white",children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4",children:"Ready to Get Started?"}),e.jsx("p",{className:"text-lg md:text-xl mb-6 md:mb-8 opacity-90",children:"Start building with FlashCore API today and transform your email automation."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[e.jsx(v,{to:"/register",children:e.jsxs(a,{size:"lg",variant:"secondary",className:"bg-white text-flashcore-purple hover:bg-gray-100",children:["Get API Key",e.jsx(S,{className:"w-4 h-4 ml-2"})]})}),e.jsx(v,{to:"/contact",children:e.jsx(a,{size:"lg",variant:"outline",className:"border-white text-white hover:bg-white hover:text-flashcore-purple",children:"Contact Support"})})]})]})}),e.jsx(I,{})]})};export{X as default};
