Files
igny8/frontend/dist/assets/js/pages-settings-Da7wPw3M.js
Gitea Deploy 961362e088 Add SEO fields to Tasks model, improve content generation response handling, and enhance progress bar animation
- Added primary_keyword, secondary_keywords, tags, and categories fields to Tasks model
- Updated generate_content function to handle full JSON response with all SEO fields
- Improved progress bar animation: smooth 1% increments every 300ms
- Enhanced step detection for content generation vs clustering vs ideas
- Fixed progress modal to show correct messages for each function type
- Added comprehensive logging to Keywords and Tasks pages for AI functions
- Fixed error handling to show meaningful error messages instead of generic failures
2025-11-09 21:22:34 +00:00

6 lines
177 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{r as o,j as e}from"./vendor-react-core-DjsjKnCi.js";import{P,C as u}from"./page-analytics.tsx-1KCk8AGD.js";import{c as It,p as At}from"./vendor-state-CYwAWrAU.js";import{G as Pt,H as Mt,I as Dt,J as Rt,K as $t,L as Ft,M as Ot,i as Y,f as Tt,g as Et,N as ft,O as Ne,h as zt,P as Bt,Q as Gt,R as Wt}from"./page-dashboard-DxYTR5eF.js";import{u as q}from"./page-reference-aC0iABvU.js";import{L as J,B as f,C as jt,o as E,r as ae}from"./page-authpages-CY7hjDHU.js";import{C as ee,M as ge,b as Ce,c as Se,d as Vt,e as Ut,D as Te,a as ie,A as be,P as _e}from"./page-components.tsx-DYfg5dka.js";import{B as C}from"./page-clusters.config.tsx-9GAd-_h-.js";import{S as xe,F as ye,P as X}from"./pages-planner-COGkFLJh.js";import{L as _t}from"./vendor-react-router-BJY_70Cr.js";const Ht=It()(At((t,s)=>({accountSettings:{},moduleSettings:{},loading:!1,error:null,loadAccountSettings:async()=>{t({loading:!0,error:null});try{const a=await Ot(),r={};a.results.forEach(i=>{r[i.key]=i}),t({accountSettings:r,loading:!1})}catch(a){t({error:a.message,loading:!1})}},loadAccountSetting:async a=>{try{const r=await Ft(a);t(i=>({accountSettings:{...i.accountSettings,[a]:r}}))}catch(r){t({error:r.message})}},updateAccountSetting:async(a,r)=>{t({loading:!0,error:null});try{const i=s().accountSettings[a];let l;i?l=await Rt(a,{config:r}):l=await $t({key:a,config:r}),t(n=>({accountSettings:{...n.accountSettings,[a]:l},loading:!1}))}catch(i){throw t({error:i.message,loading:!1}),i}},loadModuleSettings:async a=>{t({loading:!0,error:null});try{const r=await Dt(a),i={};r.forEach(l=>{i[l.key]=l}),t(l=>({moduleSettings:{...l.moduleSettings,[a]:i},loading:!1}))}catch(r){t({error:r.message,loading:!1})}},updateModuleSetting:async(a,r,i)=>{var l;t({loading:!0,error:null});try{const n=(l=s().moduleSettings[a])==null?void 0:l[r];let x;n?x=await Pt(a,r,{config:i}):x=await Mt({module_name:a,key:r,config:i}),t(g=>({moduleSettings:{...g.moduleSettings,[a]:{...g.moduleSettings[a]||{},[r]:x}},loading:!1}))}catch(n){throw t({error:n.message,loading:!1}),n}},reset:()=>{t({accountSettings:{},moduleSettings:{},loading:!1,error:null})}}),{name:"settings-storage",partialize:t=>({accountSettings:t.accountSettings,moduleSettings:t.moduleSettings})}));function Zt(){const t=q(),{accountSettings:s,loading:a,loadAccountSettings:r,updateAccountSetting:i}=Ht(),[l,n]=o.useState({records_per_page:20,default_sort:"created_at",default_sort_direction:"desc"});o.useEffect(()=>{r()},[r]),o.useEffect(()=>{s.table_settings&&n(s.table_settings.config)},[s]);const x=async()=>{try{await i("table_settings",l),t.success("Settings saved successfully")}catch(g){t.error(`Failed to save settings: ${g.message}`)}};return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"General Settings - IGNY8",description:"Plugin configuration"}),e.jsx(u,{title:"General Settings",desc:"Configure plugin settings, automation, and table preferences",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"Table Settings"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(J,{htmlFor:"records_per_page",children:"Records Per Page"}),e.jsx("input",{id:"records_per_page",type:"number",min:"5",max:"100",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:l.records_per_page,onChange:g=>n({...l,records_per_page:parseInt(g.target.value)||20})})]}),e.jsxs("div",{children:[e.jsx(J,{htmlFor:"default_sort",children:"Default Sort Field"}),e.jsx("input",{id:"default_sort",type:"text",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:l.default_sort,onChange:g=>n({...l,default_sort:g.target.value})})]}),e.jsxs("div",{children:[e.jsx(J,{htmlFor:"default_sort_direction",children:"Default Sort Direction"}),e.jsxs("select",{id:"default_sort_direction",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:focus:border-brand-800",value:l.default_sort_direction,onChange:g=>n({...l,default_sort_direction:g.target.value}),children:[e.jsx("option",{value:"asc",children:"Ascending"}),e.jsx("option",{value:"desc",children:"Descending"})]})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(f,{onClick:x,disabled:a,className:"px-6",children:a?"Saving...":"Save Settings"})})]})})]})}const dr=Object.freeze(Object.defineProperty({__proto__:null,default:Zt},Symbol.toStringTag,{value:"Module"}));function Kt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/auth/users/");a(n.results||[])}catch(n){t.error(`Failed to load users: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Users"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Users"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage account users and permissions"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Email"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Username"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Role"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"})]})}),e.jsx("tbody",{children:s.map(n=>e.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800",children:[e.jsx("td",{className:"py-3 px-4 text-sm text-gray-900 dark:text-white",children:n.email}),e.jsx("td",{className:"py-3 px-4 text-sm text-gray-600 dark:text-gray-400",children:n.username}),e.jsx("td",{className:"py-3 px-4",children:e.jsx(C,{variant:"light",color:"primary",children:n.role})}),e.jsx("td",{className:"py-3 px-4",children:e.jsx(C,{variant:"light",color:n.is_active?"success":"dark",children:n.is_active?"Active":"Inactive"})})]},n.id))})]})})})]})}const cr=Object.freeze(Object.defineProperty({__proto__:null,default:Kt},Symbol.toStringTag,{value:"Module"}));function qt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const x=await Y("/v1/auth/subscriptions/");a(x.results||[])}catch(x){t.error(`Failed to load subscriptions: ${x.message}`)}finally{i(!1)}},n=x=>{switch(x){case"active":return"success";case"past_due":return"warning";case"canceled":return"error";default:return"primary"}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Subscriptions"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Subscriptions"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage account subscriptions"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Account"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Period Start"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Period End"})]})}),e.jsx("tbody",{children:s.map(x=>e.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800",children:[e.jsx("td",{className:"py-3 px-4 text-sm text-gray-900 dark:text-white",children:x.account_name}),e.jsx("td",{className:"py-3 px-4",children:e.jsx(C,{variant:"light",color:n(x.status),children:x.status})}),e.jsx("td",{className:"py-3 px-4 text-sm text-gray-600 dark:text-gray-400",children:new Date(x.current_period_start).toLocaleDateString()}),e.jsx("td",{className:"py-3 px-4 text-sm text-gray-600 dark:text-gray-400",children:new Date(x.current_period_end).toLocaleDateString()})]},x.id))})]})})})]})}const xr=Object.freeze(Object.defineProperty({__proto__:null,default:qt},Symbol.toStringTag,{value:"Module"}));function Yt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/system/");a(n.results||[])}catch(n){t.error(`Failed to load system settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"System Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"System Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Global platform-wide settings"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"System settings management interface coming soon."})})]})}const mr=Object.freeze(Object.defineProperty({__proto__:null,default:Yt},Symbol.toStringTag,{value:"Module"}));function Jt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/account/");a(n.results||[])}catch(n){t.error(`Failed to load account settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Account Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Account Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Account-level configuration"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Account settings management interface coming soon."})})]})}const gr=Object.freeze(Object.defineProperty({__proto__:null,default:Jt},Symbol.toStringTag,{value:"Module"}));function Qt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/modules/");a(n.results||[])}catch(n){t.error(`Failed to load module settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Module Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Module Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Module-specific configuration"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Module settings management interface coming soon."})})]})}const ur=Object.freeze(Object.defineProperty({__proto__:null,default:Qt},Symbol.toStringTag,{value:"Module"}));function Xt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/ai/");a(n.results||[])}catch(n){t.error(`Failed to load AI settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"AI Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"AI Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"AI-specific configuration"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"AI settings management interface coming soon."})})]})}const hr=Object.freeze(Object.defineProperty({__proto__:null,default:Xt},Symbol.toStringTag,{value:"Module"})),yt=()=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-success-500",children:e.jsx("path",{d:"M13.4017 4.35986L6.12166 11.6399L2.59833 8.11657",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),Le=()=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-gray-400",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.05394 4.78033C3.76105 4.48744 3.76105 4.01256 4.05394 3.71967C4.34684 3.42678 4.82171 3.42678 5.1146 3.71967L8.33437 6.93944L11.5521 3.72173C11.845 3.42883 12.3199 3.42883 12.6127 3.72173C12.9056 4.01462 12.9056 4.48949 12.6127 4.78239L9.39503 8.0001L12.6127 11.2178C12.9056 11.5107 12.9056 11.9856 12.6127 12.2785C12.3198 12.5713 11.845 12.5713 11.5521 12.2785L8.33437 9.06076L5.11462 12.2805C4.82173 12.5734 4.34685 12.5734 4.05396 12.2805C3.76107 11.9876 3.76107 11.5127 4.05396 11.2199L7.27371 8.0001L4.05394 4.78033Z",fill:"currentColor"})});function ve({variant:t="1",title:s,subtitle:a,plans:r,showToggle:i=!1,onPlanSelect:l,className:n=""}){const[x,g]=o.useState("monthly"),N=d=>{d.disabled||l==null||l(d)},T=d=>typeof d=="number"?d.toFixed(2):d,_=d=>{const w=typeof d.monthlyPrice=="number"?d.monthlyPrice:typeof d.price=="number"?d.price:parseFloat(String(d.price||0));if(x==="annually"&&i){const j=w*12*.8,S=w*12;return{price:j,originalPrice:S}}return{price:w}};return t==="1"?e.jsxs("div",{className:`space-y-6 ${n}`,children:[s&&e.jsx("div",{className:"mx-auto w-full max-w-[385px]",children:e.jsx("h2",{className:"font-bold text-center text-gray-800 mb-7 text-title-sm dark:text-white/90",children:s})}),i&&e.jsx("div",{className:"mb-10 text-center",children:e.jsxs("div",{className:"relative inline-flex p-1 mx-auto bg-gray-200 rounded-full z-1 dark:bg-gray-800",children:[e.jsx("span",{className:`absolute top-1/2 -z-1 flex h-11 w-[120px] -translate-y-1/2 rounded-full bg-white shadow-theme-xs duration-200 ease-linear dark:bg-white/10 ${x==="monthly"?"translate-x-0":"translate-x-[120px]"}`}),e.jsx("button",{onClick:()=>g("monthly"),className:`flex h-11 w-[120px] items-center justify-center text-base font-medium transition-colors ${x==="monthly"?"text-gray-800 dark:text-white/90":"text-gray-500 hover:text-gray-700 dark:hover:text-white/80 dark:text-gray-400"}`,children:"Monthly"}),e.jsx("button",{onClick:()=>g("annually"),className:`flex h-11 w-[120px] items-center justify-center text-base font-medium transition-colors ${x==="annually"?"text-gray-800 dark:text-white/90":"text-gray-500 hover:text-gray-700 dark:hover:text-white/80 dark:text-gray-400"}`,children:"Annually"})]})}),e.jsx("div",{className:"grid gap-5 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:gap-6",children:r.map((d,w)=>{const j=d.highlighted||!1,S=_(d),I=x==="annually"&&i?"/year":d.period||"/month";return e.jsxs("div",{className:`rounded-2xl border p-6 flex flex-col ${j?"bg-gray-800 border-gray-800 dark:border-white/10 dark:bg-white/10":"border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]"}`,children:[e.jsx("span",{className:`block mb-3 font-semibold text-theme-xl ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:d.name}),e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-end",children:[e.jsxs("h2",{className:`font-bold text-title-md ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:["$",T(S.price)]}),e.jsx("span",{className:`inline-block mb-1 text-sm ${j?"text-white/70":"text-gray-500 dark:text-gray-400"}`,children:I})]}),(S.originalPrice||d.originalPrice)&&e.jsxs("span",{className:`font-semibold line-through text-theme-xl ${j?"text-gray-300":"text-gray-400"}`,children:["$",T(S.originalPrice||d.originalPrice||0)]})]}),d.description&&e.jsx("p",{className:`text-sm ${j?"text-white/70":"text-gray-500 dark:text-gray-400"}`,children:d.description}),e.jsx("div",{className:`w-full h-px my-6 ${j?"bg-white/20":"bg-gray-200 dark:bg-gray-800"}`}),e.jsx("ul",{className:"mb-8 space-y-3 flex-grow",children:d.features.map((h,O)=>{const $=h.startsWith("!"),Z=$?h.substring(1):h;return e.jsxs("li",{className:`flex items-center gap-3 text-sm ${j?"text-white/80":$?"text-gray-400":"text-gray-500 dark:text-gray-400"}`,children:[$?e.jsx(Le,{}):e.jsx(yt,{}),Z]},O)})}),e.jsx("button",{onClick:()=>N(d),disabled:d.disabled,className:`flex w-full items-center justify-center rounded-lg p-3.5 text-sm font-medium text-white shadow-theme-xs transition-colors mt-auto ${j?"bg-brand-500 hover:bg-brand-600 dark:hover:bg-brand-600":"bg-gray-800 hover:bg-brand-500 dark:bg-white/10 dark:hover:bg-brand-600"} ${d.disabled?"opacity-50 cursor-not-allowed":""}`,children:d.buttonText||"Choose Plan"})]},d.id||w)})})]}):t==="2"?e.jsx("div",{className:`space-y-6 ${n}`,children:e.jsx("div",{className:"grid gap-5 grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 xl:gap-6",children:r.map((d,w)=>{const j=d.highlighted||w===1;return e.jsxs("div",{className:`rounded-2xl border p-6 xl:p-8 ${j?"border-2 border-brand-500 bg-white dark:border-brand-500 dark:bg-white/[0.03]":"border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]"}`,children:[e.jsxs("div",{className:"flex items-start justify-between -mb-4",children:[e.jsx("span",{className:"block font-semibold text-gray-800 text-theme-xl dark:text-white/90",children:d.name}),d.icon&&e.jsx("span",{className:"flex h-[56px] dark:bg-brand-500/10 w-[56px] items-center justify-center rounded-[10.5px] bg-brand-50 text-brand-500",children:d.icon})]}),e.jsxs("div",{className:"flex items-end",children:[e.jsxs("h2",{className:"font-bold text-gray-800 text-title-md dark:text-white/90",children:["$",T(d.price)]}),e.jsx("span",{className:"inline-block mb-1 text-sm text-gray-500 dark:text-gray-400",children:d.period||" / Lifetime"})]}),d.description&&e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:d.description}),e.jsx("div",{className:"w-full h-px my-6 bg-gray-200 dark:bg-gray-800"}),e.jsx("ul",{className:"mb-8 space-y-3",children:d.features.map((S,I)=>{const h=S.startsWith("!"),O=h?S.substring(1):S;return e.jsxs("li",{className:`flex items-center gap-3 text-sm ${h?"text-gray-400":"text-gray-700 dark:text-gray-400"}`,children:[h?e.jsx(Le,{}):e.jsx(yt,{}),O]},I)})}),e.jsx("button",{onClick:()=>N(d),disabled:d.disabled,className:`flex w-full items-center justify-center rounded-lg p-3.5 text-sm font-medium text-white shadow-theme-xs transition-colors ${j?"bg-brand-500 hover:bg-brand-600":"bg-gray-800 hover:bg-brand-500 dark:bg-white/10 dark:hover:bg-brand-600"} ${d.disabled?"opacity-50 cursor-not-allowed":""}`,children:d.buttonText||(j?"Choose This Plan":"Choose Starter")})]},d.id||w)})})}):t==="3"?e.jsx("div",{className:`space-y-6 ${n}`,children:e.jsx("div",{className:"grid gap-5 grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 xl:gap-3 2xl:grid-cols-4",children:r.map((d,w)=>{const j=d.recommended||w===2;return e.jsx("div",{children:e.jsxs("div",{className:`rounded-2xl p-6 ${j?"relative bg-brand-500":"bg-white dark:bg-white/[0.03]"}`,children:[j&&e.jsx("div",{className:"absolute px-3 py-1 font-medium text-white rounded-lg right-4 top-4 -z-1 bg-white/10 text-theme-xs",children:"Recommended"}),e.jsx("span",{className:`block font-semibold text-theme-xl ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:d.name}),d.description&&e.jsx("p",{className:`mt-1 text-sm ${j?"text-white/90":"text-gray-500 dark:text-gray-400"}`,children:d.description}),e.jsx("h2",{className:`mb-0.5 mt-4 text-title-sm font-bold ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:typeof d.price=="string"&&d.price.toLowerCase()==="free"?"Free":`$${T(d.price)}`}),e.jsx("span",{className:`inline-block mb-6 text-sm ${j?"text-white/90":"text-gray-500 dark:text-gray-400"}`,children:d.period||"For a Lifetime"}),e.jsx("button",{onClick:()=>N(d),disabled:d.disabled,className:`flex h-11 w-full items-center justify-center rounded-lg p-3.5 text-sm font-medium shadow-theme-xs transition-colors ${j?"bg-white text-gray-800 hover:bg-gray-50":d.disabled?"border border-gray-300 bg-white text-gray-400 disabled:pointer-events-none dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-white/[0.03] dark:hover:text-gray-200":"bg-brand-500 text-white hover:bg-brand-600"}`,children:d.buttonText||(d.disabled?"Current Plan":"Try for Free")}),e.jsx("ul",{className:"mt-6 space-y-3",children:d.features.map((S,I)=>{const h=S.startsWith("!"),O=h?S.substring(1):S;return e.jsxs("li",{className:`flex items-center gap-3 text-sm ${j?"text-white":h?"text-gray-400":"text-gray-700 dark:text-gray-400"}`,children:[h?e.jsx(Le,{}):e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:j?"text-white":"text-success-500",children:e.jsx("path",{d:"M13.4017 4.35986L6.12166 11.6399L2.59833 8.11657",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),O]},I)})})]})},d.id||w)})})}):null}const me=t=>t.toLocaleString(),es=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(0)}K`:t.toString(),ts=t=>{const s=[];if(s.push(`${t.max_sites} ${t.max_sites===1?"Site":"Sites"}`),s.push(`${t.max_users} ${t.max_users===1?"User":"Users"}`),s.push(`${me(t.max_keywords)} Keywords`),s.push(`${me(t.max_clusters)} Clusters`),s.push(`${me(t.max_content_ideas)} Content Ideas`),s.push(`${es(t.monthly_word_count_limit)} Words/Month`),s.push(`${t.daily_content_tasks} Daily Content Tasks`),s.push(`${t.monthly_image_count} Images/Month`),t.image_model_choices&&t.image_model_choices.length>0){const a=t.image_model_choices.map(r=>r.toUpperCase()).join(", ");s.push(`${a} Image Models`)}return s.push(`${me(t.included_credits)} AI Credits Included`),s.push(`${me(t.monthly_ai_credit_limit)} Monthly AI Credit Limit`),t.features&&Array.isArray(t.features)&&(t.features.includes("ai_writer")&&s.push("AI Writer"),t.features.includes("image_gen")&&s.push("Image Generation"),t.features.includes("auto_publish")&&s.push("Auto Publish"),t.features.includes("custom_prompts")&&s.push("Custom Prompts")),s},ss=(t,s,a)=>{const r=typeof t.price=="number"?t.price:parseFloat(String(t.price||0)),i=t.slug.toLowerCase()==="growth";return{id:t.id,name:t.name,monthlyPrice:r,price:r,period:"/month",description:rs(t),features:ts(t),buttonText:"Choose Plan",highlighted:i}},rs=t=>{const s=t.slug.toLowerCase();return s.includes("free")?"Perfect for getting started":s.includes("starter")?"For solo designers & freelancers":s.includes("growth")?"For growing businesses":s.includes("scale")||s.includes("enterprise")?"For teams and large organizations":"Choose the perfect plan for your needs"};function as(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const N=((await Y("/v1/auth/plans/")).results||[]).filter(T=>T.is_active).sort((T,_)=>{const d=typeof T.price=="number"?T.price:parseFloat(String(T.price||0)),w=typeof _.price=="number"?_.price:parseFloat(String(_.price||0));return d-w});a(N)}catch(g){t.error(`Failed to load plans: ${g.message}`)}finally{i(!1)}},n=g=>{console.log("Selected plan:",g),t.success(`Selected plan: ${g.name}`)},x=s.map((g,N)=>ss(g,N,s.length));return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Plans"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Plans"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Choose the perfect plan for your needs. All plans include our core features."})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading plans..."})}):x.length===0?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"No active plans available"})}):e.jsxs(e.Fragment,{children:[e.jsx(ve,{variant:"1",title:"Flexible Plans Tailored to Fit Your Unique Needs!",plans:x,showToggle:!0,onPlanSelect:n}),e.jsx("div",{className:"mt-8 text-center",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Need more details? View all features and limits for each plan."})})]})]})}const pr=Object.freeze(Object.defineProperty({__proto__:null,default:as},Symbol.toStringTag,{value:"Module"}));function is(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Tt();a(n.industries||[])}catch(n){t.error(`Failed to load industries: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Industries"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Industries"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage global industry templates (Admin Only)"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:s.map(n=>e.jsxs(ee,{className:"p-6",children:[e.jsxs("div",{className:"flex justify-between items-start mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:n.name}),e.jsx(C,{variant:"light",color:n.is_active?"success":"dark",children:n.is_active?"Active":"Inactive"})]}),n.description&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:n.description}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Sectors: ",n.sectors_count||0]})]},n.id))})]})}const br=Object.freeze(Object.defineProperty({__proto__:null,default:is},Symbol.toStringTag,{value:"Module"})),le=t=>{switch(t){case"healthy":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400";case"warning":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400";case"critical":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400";default:return"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-400"}};function ns(){var x,g,N,T,_,d,w,j,S,I,h,O,$,Z,W,A,R,U,F,H,c,p,v,M,k,b,y,L,G,z,D,ue,de,he,ce,m,V,Q,te,we,pe,Re,$e,Fe,Oe,Ee,ze,Be,Ge,We,Ve,Ue,He,Ze,Ke,qe,Ye,Je,Qe,Xe,et,tt,st,rt,at,it,nt,lt,ot,dt,ct,xt,mt,gt,ut,ht,pt,bt;const[t,s]=o.useState(null),[a,r]=o.useState(!0),[i,l]=o.useState(null),n=async()=>{try{const se=await Y("/v1/system/status/");s(se),l(null)}catch(se){l(se instanceof Error?se.message:"Unknown error")}finally{r(!1)}};return o.useEffect(()=>{n();const se=setInterval(n,3e4);return()=>clearInterval(se)},[]),a?e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"System Status - IGNY8",description:"System monitoring"}),e.jsx(u,{title:"System Status",desc:"Loading system information...",children:e.jsx("div",{className:"text-center py-8",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 dark:border-white mx-auto"})})})]}):i||!t?e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"System Status - IGNY8",description:"System monitoring"}),e.jsx(u,{title:"System Status",desc:"Error loading system information",children:e.jsx("div",{className:"text-center py-8 text-red-600 dark:text-red-400",children:i||"Failed to load system status"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"System Status - IGNY8",description:"System monitoring"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(u,{title:"System Resources",desc:"CPU, Memory, and Disk Usage",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"CPU"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((g=(x=t.system)==null?void 0:x.cpu)==null?void 0:g.status)||"unknown")}`,children:((T=(N=t.system)==null?void 0:N.cpu)==null?void 0:T.status)||"unknown"})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-4",children:e.jsx("div",{className:`h-4 rounded-full ${(((d=(_=t.system)==null?void 0:_.cpu)==null?void 0:d.usage_percent)||0)<80?"bg-green-500":(((j=(w=t.system)==null?void 0:w.cpu)==null?void 0:j.usage_percent)||0)<95?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((I=(S=t.system)==null?void 0:S.cpu)==null?void 0:I.usage_percent)||0}%`}})}),e.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[($=(O=(h=t.system)==null?void 0:h.cpu)==null?void 0:O.usage_percent)==null?void 0:$.toFixed(1),"% used (",(W=(Z=t.system)==null?void 0:Z.cpu)==null?void 0:W.cores," cores)"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Memory"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((R=(A=t.system)==null?void 0:A.memory)==null?void 0:R.status)||"unknown")}`,children:((F=(U=t.system)==null?void 0:U.memory)==null?void 0:F.status)||"unknown"})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-4",children:e.jsx("div",{className:`h-4 rounded-full ${(((c=(H=t.system)==null?void 0:H.memory)==null?void 0:c.usage_percent)||0)<80?"bg-green-500":(((v=(p=t.system)==null?void 0:p.memory)==null?void 0:v.usage_percent)||0)<95?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((k=(M=t.system)==null?void 0:M.memory)==null?void 0:k.usage_percent)||0}%`}})}),e.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[(L=(y=(b=t.system)==null?void 0:b.memory)==null?void 0:y.used_gb)==null?void 0:L.toFixed(1)," GB / ",(D=(z=(G=t.system)==null?void 0:G.memory)==null?void 0:z.total_gb)==null?void 0:D.toFixed(1)," GB"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Disk"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((de=(ue=t.system)==null?void 0:ue.disk)==null?void 0:de.status)||"unknown")}`,children:((ce=(he=t.system)==null?void 0:he.disk)==null?void 0:ce.status)||"unknown"})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-4",children:e.jsx("div",{className:`h-4 rounded-full ${(((V=(m=t.system)==null?void 0:m.disk)==null?void 0:V.usage_percent)||0)<80?"bg-green-500":(((te=(Q=t.system)==null?void 0:Q.disk)==null?void 0:te.usage_percent)||0)<95?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((pe=(we=t.system)==null?void 0:we.disk)==null?void 0:pe.usage_percent)||0}%`}})}),e.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[(Fe=($e=(Re=t.system)==null?void 0:Re.disk)==null?void 0:$e.used_gb)==null?void 0:Fe.toFixed(1)," GB / ",(ze=(Ee=(Oe=t.system)==null?void 0:Oe.disk)==null?void 0:Ee.total_gb)==null?void 0:ze.toFixed(1)," GB"]})]})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsx(u,{title:"Database",desc:"PostgreSQL Status",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Status"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((Be=t.database)==null?void 0:Be.status)||"unknown")}`,children:(Ge=t.database)!=null&&Ge.connected?"Connected":"Disconnected"})]}),((We=t.database)==null?void 0:We.version)&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Version:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:t.database.version.split(",")[0]})]}),((Ve=t.database)==null?void 0:Ve.size)&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Size:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:t.database.size})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Active Connections:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((Ue=t.database)==null?void 0:Ue.active_connections)||0})]})]})}),e.jsx(u,{title:"Redis",desc:"Cache & Message Broker",children:e.jsx("div",{className:"space-y-3",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Status"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((He=t.redis)==null?void 0:He.status)||"unknown")}`,children:(Ze=t.redis)!=null&&Ze.connected?"Connected":"Disconnected"})]})})}),e.jsx(u,{title:"Celery",desc:"Task Queue Workers",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Workers"}),e.jsxs("span",{className:`text-xs px-2 py-1 rounded ${le(((Ke=t.celery)==null?void 0:Ke.status)||"unknown")}`,children:[((qe=t.celery)==null?void 0:qe.worker_count)||0," active"]})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Active Tasks:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((Je=(Ye=t.celery)==null?void 0:Ye.tasks)==null?void 0:Je.active)||0})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Scheduled:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((Xe=(Qe=t.celery)==null?void 0:Qe.tasks)==null?void 0:Xe.scheduled)||0})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Reserved:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((tt=(et=t.celery)==null?void 0:et.tasks)==null?void 0:tt.reserved)||0})]})]})})]}),e.jsx(u,{title:"Process Monitoring",desc:"Resource usage by technology stack",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"Stack"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"Processes"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"CPU %"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"Memory (MB)"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:Object.entries(((st=t.processes)==null?void 0:st.by_stack)||{}).map(([se,ke])=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-4 py-3 text-sm font-medium text-gray-800 dark:text-gray-200 capitalize",children:se}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-600 dark:text-gray-400",children:ke.count}),e.jsxs("td",{className:"px-4 py-3 text-sm text-gray-600 dark:text-gray-400",children:[ke.cpu.toFixed(2),"%"]}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-600 dark:text-gray-400",children:ke.memory_mb.toFixed(2)})]},se))})]})})}),e.jsx(u,{title:"Module Statistics",desc:"Data counts by module",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-gray-200",children:"Planner Module"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Keywords:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((it=(at=(rt=t.modules)==null?void 0:rt.planner)==null?void 0:at.keywords)==null?void 0:it.toLocaleString())||0})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Clusters:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((ot=(lt=(nt=t.modules)==null?void 0:nt.planner)==null?void 0:lt.clusters)==null?void 0:ot.toLocaleString())||0})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Content Ideas:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((xt=(ct=(dt=t.modules)==null?void 0:dt.planner)==null?void 0:ct.content_ideas)==null?void 0:xt.toLocaleString())||0})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-gray-200",children:"Writer Module"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Tasks:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((ut=(gt=(mt=t.modules)==null?void 0:mt.writer)==null?void 0:gt.tasks)==null?void 0:ut.toLocaleString())||0})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Images:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((bt=(pt=(ht=t.modules)==null?void 0:ht.writer)==null?void 0:pt.images)==null?void 0:bt.toLocaleString())||0})]})]})]})]})}),e.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:["Last updated: ",new Date(t.timestamp).toLocaleString()]})]})]})}const fr=Object.freeze(Object.defineProperty({__proto__:null,default:ns},Symbol.toStringTag,{value:"Module"})),De=({label:t,defaultChecked:s=!1,checked:a,disabled:r=!1,onChange:i,color:l="blue"})=>{const n=a!==void 0,[x,g]=o.useState(s);o.useEffect(()=>{n&&a!==x&&g(a)},[a,n,x]),o.useEffect(()=>{!n&&s!==x&&g(s)},[s,n,x]);const N=n?a??!1:x,T=()=>{if(r)return;const d=!N;n||g(d),i&&i(d)},_=l==="blue"?{background:N?"bg-brand-500 ":"bg-gray-200 dark:bg-white/10",knob:N?"translate-x-full bg-white":"translate-x-0 bg-white"}:{background:N?"bg-gray-800 dark:bg-white/10":"bg-gray-200 dark:bg-white/10",knob:N?"translate-x-full bg-white":"translate-x-0 bg-white"};return e.jsxs("label",{className:`flex cursor-pointer select-none items-center gap-3 text-sm font-medium ${r?"text-gray-400":"text-gray-700 dark:text-gray-400"}`,onClick:T,children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:`block transition duration-150 ease-linear h-6 w-11 rounded-full ${r?"bg-gray-100 pointer-events-none dark:bg-gray-800":_.background}`}),e.jsx("div",{className:`absolute left-0.5 top-0.5 h-5 w-5 rounded-full shadow-theme-sm duration-150 ease-linear transform ${_.knob}`})]}),t]})};function Lt(t){const{resourceId:s,getEndpoint:a,saveEndpoint:r,initialEnabled:i=!1,extractEnabled:l=A=>(A==null?void 0:A.enabled)??!1,buildPayload:n=(A,R)=>({...A,enabled:R}),onToggleSuccess:x,onToggleError:g,loadOnMount:N=!0}=t,[T,_]=o.useState(i),[d,w]=o.useState(!1),[j,S]=o.useState(null),[I,h]=o.useState(null),O=o.useCallback(async()=>{w(!0),S(null);try{const A=a.replace("{id}",s),R=await Y(A);if(R.success&&R.data){const U=R.data;h(U);const F=l(U);_(F)}else h({}),_(i)}catch(A){const R=A instanceof Error?A:new Error(String(A));S(R),console.error(`Error loading state for ${s}:`,R)}finally{w(!1)}},[s,a,l,i]),$=o.useCallback(async A=>{w(!0),S(null);try{const R=r.replace("{id}",s),U=n(I||{},A),F=await Y(R,{method:"POST",body:JSON.stringify(U)});if(F.success){const H={...I||{},enabled:A};h(H),_(A),x&&x(A,H)}else throw new Error(F.error||"Failed to save state")}catch(R){const U=R instanceof Error?R:new Error(String(R));S(U),console.error(`Error saving state for ${s}:`,U),g&&g(U)}finally{w(!1)}},[s,r,n,I,x,g]),Z=o.useCallback(async A=>{await $(A)},[$]),W=o.useCallback(async()=>{await O()},[O]);return o.useEffect(()=>{N&&O()},[N]),{enabled:T,toggle:Z,loading:d,error:j,data:I,refresh:W}}function vt({icon:t,title:s,description:a,enabled:r,validationStatus:i,onToggle:l,onSettings:n,onDetails:x,integrationId:g,getEndpoint:N,saveEndpoint:T,onToggleSuccess:_,onToggleError:d,modelName:w}){const j=q(),S=g?Lt({resourceId:g,getEndpoint:N||"/v1/system/settings/integrations/{id}/",saveEndpoint:T||"/v1/system/settings/integrations/{id}/save/",initialEnabled:!1,onToggleSuccess:(A,R)=>{j.success(`${g} ${A?"enabled":"disabled"}`),_&&_(A,R)},onToggleError:A=>{j.error(`Failed to update ${g}: ${A.message}`),d&&d(A)}}):null,I=S?S.enabled:r??!1,h=S?A=>{S.toggle(A)}:A=>{l&&l(A)},O=S?S.loading:!1,$=()=>!I||i==="not_configured"?"bg-gray-400 dark:bg-gray-500":i==="pending"?"bg-gray-400 dark:bg-gray-500 animate-pulse":i==="success"?"bg-green-500 dark:bg-green-600":i==="error"?"bg-red-500 dark:bg-red-600":"bg-gray-400 dark:bg-gray-500",W=!I||i==="not_configured"?{text:"Disabled",color:"text-gray-400 dark:text-gray-500",bold:!1}:i==="pending"?{text:"Pending",color:"text-gray-400 dark:text-gray-500",bold:!1}:i==="success"?{text:"Enabled",color:"text-gray-800 dark:text-white",bold:!0}:i==="error"?{text:"Error",color:"text-red-600 dark:text-red-400",bold:!1}:{text:"Disabled",color:"text-gray-400 dark:text-gray-500",bold:!1};return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-9",children:[e.jsx("div",{className:"mb-5 inline-flex h-10 w-10 items-center justify-center",children:t}),e.jsx("h3",{className:"mb-3 text-lg font-semibold text-gray-800 dark:text-white/90",children:s}),e.jsx("p",{className:"max-w-xs text-sm text-gray-500 dark:text-gray-400",children:a}),g==="runware"?e.jsx("div",{className:"absolute top-5 right-5",children:e.jsx("span",{className:`text-sm font-semibold ${w?"text-gray-800 dark:text-white":"text-gray-400 dark:text-gray-500"}`,children:w||"Disabled"})}):e.jsxs("div",{className:"absolute top-5 right-5 flex items-center gap-2",children:[e.jsx("span",{className:`text-sm ${W.color} ${W.bold?"font-bold":""} transition-colors duration-200`,children:W.text}),e.jsx("div",{className:`w-[25px] h-[25px] rounded-full ${$()} transition-colors duration-200`,title:i==="not_configured"?"Not configured":i==="pending"?"Validating...":i==="success"?"Validated successfully":i==="error"?"Validation failed":"Unknown status"})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 p-5 dark:border-gray-800",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{variant:"outline",size:"md",onClick:n,className:"shadow-theme-xs inline-flex h-11 w-11 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[e.jsx("path",{d:"M5.64615 4.59906C5.05459 4.25752 4.29808 4.46015 3.95654 5.05171L2.69321 7.23986C2.35175 7.83128 2.5544 8.58754 3.14582 8.92899C3.97016 9.40493 3.97017 10.5948 3.14583 11.0707C2.55441 11.4122 2.35178 12.1684 2.69323 12.7598L3.95657 14.948C4.2981 15.5395 5.05461 15.7422 5.64617 15.4006C6.4706 14.9247 7.50129 15.5196 7.50129 16.4715C7.50129 17.1545 8.05496 17.7082 8.73794 17.7082H11.2649C11.9478 17.7082 12.5013 17.1545 12.5013 16.4717C12.5013 15.5201 13.5315 14.9251 14.3556 15.401C14.9469 15.7423 15.7029 15.5397 16.0443 14.9485L17.3079 12.7598C17.6494 12.1684 17.4467 11.4121 16.8553 11.0707C16.031 10.5948 16.031 9.40494 16.8554 8.92902C17.4468 8.58757 17.6494 7.83133 17.3079 7.23992L16.0443 5.05123C15.7029 4.45996 14.9469 4.25737 14.3556 4.59874C13.5315 5.07456 12.5013 4.47961 12.5013 3.52798C12.5013 2.84515 11.9477 2.2915 11.2649 2.2915L8.73795 2.2915C8.05496 2.2915 7.50129 2.84518 7.50129 3.52816C7.50129 4.48015 6.47059 5.07505 5.64615 4.59906Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12.5714 9.99977C12.5714 11.4196 11.4204 12.5706 10.0005 12.5706C8.58069 12.5706 7.42969 11.4196 7.42969 9.99977C7.42969 8.57994 8.58069 7.42894 10.0005 7.42894C11.4204 7.42894 12.5714 8.57994 12.5714 9.99977Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsx(f,{variant:"outline",size:"md",onClick:x,className:"shadow-theme-xs inline-flex h-11 items-center justify-center rounded-lg border border-gray-300 px-4 py-3 text-sm font-medium text-gray-700 dark:border-gray-700 dark:text-gray-400",children:"Details"})]}),e.jsx(De,{label:"",checked:I,disabled:O,onChange:h})]})]})}function wt({title:t,description:s,integrationId:a,icon:r}){var _;const[i,l]=o.useState(!1),[n,x]=o.useState(null),[g,N]=o.useState(!1);if(a!=="openai"&&a!=="runware")return null;const T=async(d=!1)=>{l(!0),N(d),x(null);try{const w=await Y(`/v1/system/settings/integrations/${a}/`);let j="",S="gpt-4.1";if(w.success&&w.data&&(j=w.data.apiKey||"",S=w.data.model||"gpt-4.1"),!j){x({success:!1,message:"API key not configured. Please configure your API key in settings first."}),l(!1);return}const I={apiKey:j};a==="openai"&&(I.config={model:S,with_response:d});const h=await Y(`/v1/system/settings/integrations/${a}/test/`,{method:"POST",body:JSON.stringify(I)});h.success?x({success:!0,message:h.message||"API connection successful!",model_used:h.model_used||h.model,response:h.response,tokens_used:h.tokens_used,total_tokens:h.total_tokens,cost:h.cost,full_response:h.full_response||{image_url:h.image_url,provider:h.provider,size:h.size}}):x({success:!1,message:h.error||h.message||"API connection failed"})}catch(w){x({success:!1,message:`API connection failed: ${w.message||"Unknown error"}`})}finally{l(!1)}};return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-6",children:[e.jsx("h3",{className:"mb-2 text-base font-semibold text-gray-800 dark:text-white/90",children:t}),s&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})]}),e.jsx("div",{className:"border-t border-gray-200 p-5 dark:border-gray-800",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex gap-3",children:a==="openai"?e.jsxs(e.Fragment,{children:[e.jsx(f,{variant:"outline",onClick:()=>T(!1),disabled:i,className:"flex-1",children:i&&!g?"Testing...":"Test OpenAI Connection"}),e.jsx(f,{variant:"outline",onClick:()=>T(!0),disabled:i,className:"flex-1",children:i&&g?"Testing...":"Test OpenAI Response (Ping)"})]}):e.jsx(f,{variant:"outline",onClick:()=>T(!1),disabled:i,className:"flex-1",children:i?"Testing...":"Test Runware Connection"})}),n&&e.jsxs("div",{className:"space-y-3",children:[n.success&&e.jsxs("div",{className:"flex items-center gap-2 text-green-600 dark:text-green-400",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),e.jsx("span",{className:"text-sm font-medium",children:n.message})]}),!n.success&&e.jsxs("div",{className:"flex items-center gap-2 text-red-600 dark:text-red-400",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),e.jsx("span",{className:"text-sm font-medium",children:n.message})]}),n.success&&e.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 border-l-4 border-blue-500 p-4 rounded",children:e.jsx("div",{className:"space-y-2 text-sm",children:a==="openai"&&g?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Model Used:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white font-mono-custom",children:n.model_used||"N/A"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Expected:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:'"OK! Ping Received"'})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Actual Response:"})," ",e.jsxs("span",{className:"text-gray-900 dark:text-white",children:['"',n.response||"N/A",'"']})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Token Limit Sent:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:"N/A (from your settings)"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Tokens Used:"})," ",e.jsxs("span",{className:"text-gray-900 dark:text-white",children:[n.tokens_used||"N/A"," (input/output)"]})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Total Tokens:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:n.total_tokens||"N/A"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Cost:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:n.cost||"$0.0000"})]})]}):a==="runware"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Provider:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:"Runware"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Model:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white font-mono-custom",children:n.model_used||"runware:97@1"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Image Size:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:"128 x 128 (test image)"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Cost:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:n.cost||"$0.0360"})]}),((_=n.full_response)==null?void 0:_.image_url)&&e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Test Image:"})," ",e.jsx("a",{href:n.full_response.image_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:"View Image"})]})]}):null})})]})]})})]})}function ls({title:t,description:s,integrationId:a,icon:r}){const i=q(),[l,n]=o.useState(!1),[x,g]=o.useState(""),[N,T]=o.useState("text, watermark, logo, overlay, title, caption, writing on walls, writing on objects, UI, infographic elements, post title"),[_,d]=o.useState("realistic"),[w,j]=o.useState("1024x1024"),[S,I]=o.useState("webp"),[h,O]=o.useState({}),$={"dall-e-3":["1024x1024","1024x1792","1792x1024"],"dall-e-2":["256x256","512x512","1024x1024"]},Z=()=>{const y=(h.service||"openai")==="openai"?h.model||"dall-e-3":null;return y&&$[y]?$[y]:$["dall-e-3"]};o.useEffect(()=>{const b=Z();b.length>0&&!b.includes(w)&&j(b[0])},[h.model,h.service]);const[W,A]=o.useState(null),[R,U]=o.useState(null),F="https://api.igny8.com/api";o.useEffect(()=>{(async()=>{try{const y=await fetch(`${F}/v1/system/settings/integrations/image_generation/`,{credentials:"include"});if(y.ok){const L=await y.json();L.success&&L.data&&O(L.data)}}catch(y){console.error("Error loading image settings:",y)}})()},[F]);const H=async()=>{if(console.log("[ImageGenerationCard] handleGenerate called"),!x.trim()){i.error("Please enter a prompt description");return}n(!0),U(null),A(null);try{const b=h.service||"openai",y=b==="openai"?h.model||"dall-e-3":h.runwareModel||"runware:97@1";console.log("[ImageGenerationCard] Service and model:",{service:b,model:y,imageSettings:h});const L=`Create a high-quality ${_} image. ${x}`;console.log("[ImageGenerationCard] Full prompt:",L.substring(0,100)+"...");const G={prompt:L,negative_prompt:N,image_type:_,image_size:w,image_format:S,provider:b,model:y};console.log("[ImageGenerationCard] Making request to image generation endpoint"),console.log("[ImageGenerationCard] Request body:",G);const z=await Y("/v1/system/settings/integrations/image_generation/generate/",{method:"POST",body:JSON.stringify(G)});if(console.log("[ImageGenerationCard] Response data:",z),!z.success)throw new Error(z.error||"Failed to generate image");const D={url:z.image_url,revised_prompt:z.revised_prompt,model:z.model||y,provider:z.provider||b,size:w,format:S.toUpperCase(),cost:z.cost};A(D),window.dispatchEvent(new CustomEvent("imageGenerated",{detail:D})),console.log("[ImageGenerationCard] Image generation successful:",D),i.success("Image generated successfully!")}catch(b){console.error("[ImageGenerationCard] Error in handleGenerate:",{error:b,message:b.message,stack:b.stack});const y=b.message||"Failed to generate image";U(y),window.dispatchEvent(new CustomEvent("imageGenerationError",{detail:y})),i.error(y)}finally{console.log("[ImageGenerationCard] handleGenerate completed"),n(!1)}},c=()=>{if((h.service||"openai")==="openai"){const y=h.model||"dall-e-3";return`OpenAI ${{"dall-e-3":"DALL·E 3","dall-e-2":"DALL·E 2","gpt-image-1":"GPT Image 1 (Full)","gpt-image-1-mini":"GPT Image 1 Mini"}[y]||y}`}else return"Runware"},p={"1024x1024":"Square - 1024 x 1024","1024x1792":"Portrait - 1024 x 1792","1792x1024":"Landscape - 1792 x 1024","256x256":"Small - 256 x 256","512x512":"Medium - 512 x 512"},v=Z().map(b=>({value:b,label:p[b]||b})),M=[{value:"realistic",label:"Realistic"},{value:"illustration",label:"Illustration"},{value:"3D render",label:"3D Render"},{value:"minimalist",label:"Minimalist"},{value:"cartoon",label:"Cartoon"}],k=[{value:"webp",label:"WEBP"},{value:"jpg",label:"JPG"},{value:"png",label:"PNG"}];return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-6",children:[r&&e.jsx("div",{className:"mb-4 inline-flex h-10 w-10 items-center justify-center",children:r}),e.jsx("h3",{className:"mb-2 text-base font-semibold text-gray-800 dark:text-white/90",children:t}),s&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})]}),e.jsx("div",{className:"border-t border-gray-200 p-5 dark:border-gray-800",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-blue-50 px-4 py-3 dark:bg-blue-900/20",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:"text-blue-600 dark:text-blue-400",children:e.jsx("path",{d:"M10 2L3 7V17C3 17.5304 3.21071 18.0391 3.58579 18.4142C3.96086 18.7893 4.46957 19 5 19H15C15.5304 19 16.0391 18.7893 16.4142 18.4142C16.7893 18.0391 17 17.5304 17 17V7L10 2Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:"Provider & Model"}),e.jsx("p",{className:"text-sm font-semibold text-blue-900 dark:text-blue-200",children:c()})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Prompt Description *"}),e.jsx("textarea",{value:x,onChange:b=>g(b.target.value),rows:6,className:"w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",placeholder:"Describe the visual elements, style, mood, and composition you want in the image..."}),e.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Describe the visual elements, style, mood, and composition you want in the image."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Negative Prompt"}),e.jsx("textarea",{value:N,onChange:b=>T(b.target.value),rows:2,className:"w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",placeholder:"Describe what you DON'T want in the image..."}),e.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Specify elements to avoid in the generated image (text, watermarks, logos, etc.)."})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Image Type"}),e.jsx("select",{value:_,onChange:b=>d(b.target.value),className:"w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:M.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Image Size"}),e.jsx("select",{value:w,onChange:b=>j(b.target.value),className:"w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:v.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Image Format"}),e.jsx("select",{value:S,onChange:b=>I(b.target.value),className:"w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:k.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(f,{onClick:H,disabled:l||!x.trim(),className:"inline-flex items-center gap-2 px-6 py-2.5",children:l?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("circle",{cx:"9",cy:"9",r:"2"}),e.jsx("path",{d:"M21 15l-3.086-3.086a2 2 0 00-2.828 0L6 21"})]}),"Generate Image"]})})})]})}),R&&e.jsx("div",{className:"mt-4 rounded-lg border border-red-200 bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20",children:e.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:R})})]})}function os({title:t,description:s,icon:a,generatedImage:r,error:i}){const[l,n]=o.useState(r),[x,g]=o.useState(i);return o.useEffect(()=>{const N=_=>{n(_.detail),g(null)},T=_=>{g(_.detail),n(null)};return window.addEventListener("imageGenerated",N),window.addEventListener("imageGenerationError",T),()=>{window.removeEventListener("imageGenerated",N),window.removeEventListener("imageGenerationError",T)}},[]),o.useEffect(()=>{n(r)},[r]),o.useEffect(()=>{g(i)},[i]),e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-6",children:[a&&e.jsx("div",{className:"mb-4 inline-flex h-10 w-10 items-center justify-center",children:a}),e.jsx("h3",{className:"mb-2 text-base font-semibold text-gray-800 dark:text-white/90",children:t}),s&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})]}),e.jsx("div",{className:"border-t border-gray-200 p-5 dark:border-gray-800",children:x?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx("div",{className:"mb-4 rounded-full bg-red-100 p-4 dark:bg-red-900/20",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-red-600 dark:text-red-400",children:[e.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}),e.jsx("h4",{className:"mb-2 text-lg font-semibold text-gray-800 dark:text-white",children:"Generation Failed"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:x})]}):l!=null&&l.url?e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-200 dark:border-gray-700",children:e.jsx("img",{src:l.url,alt:"Generated image",className:"w-full object-contain",style:{maxHeight:"400px"}})}),e.jsxs("div",{className:"space-y-3 rounded-lg bg-gray-50 p-4 dark:bg-gray-800/50",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-white",children:"Image Details"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Size:"}),e.jsxs("span",{className:"ml-2 text-gray-800 dark:text-white",children:[l.size||"1024x1024"," pixels"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Format:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-white",children:l.format||"WEBP"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Model:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-white",children:l.model||"DALL·E 3"})]}),l.cost&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Cost:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-white",children:l.cost})]})]}),l.revised_prompt&&e.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3 dark:border-gray-700",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-gray-600 dark:text-gray-400",children:"Revised Prompt:"}),e.jsx("p",{className:"text-xs text-gray-700 dark:text-gray-300",children:l.revised_prompt})]}),l.negative_prompt&&e.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3 dark:border-gray-700",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-gray-600 dark:text-gray-400",children:"Negative Prompt:"}),e.jsx("p",{className:"text-xs text-gray-700 dark:text-gray-300",children:l.negative_prompt})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-800",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"View Original"]}),e.jsxs("button",{onClick:()=>{navigator.clipboard.writeText(l.url)},className:"inline-flex items-center gap-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-800",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),e.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy URL"]})]})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx("div",{className:"mb-4 rounded-full bg-gray-100 p-4 dark:bg-gray-800",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400 dark:text-gray-500",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("circle",{cx:"9",cy:"9",r:"2"}),e.jsx("path",{d:"M21 15l-3.086-3.086a2 2 0 00-2.828 0L6 21"})]})}),e.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500",children:'No image generated yet. Fill out the form and click "Generate Image" to create your first AI image.'})]})})]})}function ds({icon:t,title:s,description:a,validationStatus:r,onSettings:i,onDetails:l}){const n=q(),x=Lt({resourceId:"image_generation",getEndpoint:"/v1/system/settings/integrations/{id}/",saveEndpoint:"/v1/system/settings/integrations/{id}/save/",initialEnabled:!1,onToggleSuccess:I=>{n.success(`Image generation service ${I?"enabled":"disabled"}`)},onToggleError:I=>{n.error(`Failed to update image generation service: ${I.message}`)}}),g=x.enabled,N=x.loading,[T,_]=o.useState({}),d="https://api.igny8.com/api";o.useEffect(()=>{(async()=>{try{const h=await fetch(`${d}/v1/system/settings/integrations/image_generation/`,{credentials:"include"});if(h.ok){const O=await h.json();O.success&&O.data&&_(O.data)}}catch(h){console.error("Error loading image settings:",h)}})()},[d,g]);const w=I=>{x.toggle(I)},j=()=>{const I=T.service||"openai";if(I==="openai"){const h=T.model||"dall-e-3";return`OpenAI ${{"dall-e-3":"DALL·E 3","dall-e-2":"DALL·E 2","gpt-image-1":"GPT Image 1 (Full)","gpt-image-1-mini":"GPT Image 1 Mini"}[h]||h}`}else if(I==="runware"){const h=T.runwareModel||"runware:97@1";return`Runware ${{"runware:97@1":"HiDream-I1 Full","runware:gen3a_turbo":"Gen3a Turbo","runware:gen3a":"Gen3a"}[h]||h}`}return"Not configured"},S=()=>(T.service,!(T.model||T.runwareModel)||r==="not_configured"||r==="pending"?"text-gray-400 dark:text-gray-500":"text-black dark:text-white");return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-9",children:[e.jsx("div",{className:"mb-5 inline-flex h-10 w-10 items-center justify-center",children:t}),e.jsx("h3",{className:"mb-3 text-lg font-semibold text-gray-800 dark:text-white/90",children:s}),e.jsx("p",{className:"max-w-xs text-sm text-gray-500 dark:text-gray-400",children:a}),e.jsx("div",{className:"absolute top-5 right-5 h-fit",children:e.jsx("p",{className:`text-lg font-semibold ${S()} transition-colors duration-200`,children:j()})})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 p-5 dark:border-gray-800",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{variant:"outline",size:"md",onClick:i,className:"shadow-theme-xs inline-flex h-11 w-11 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[e.jsx("path",{d:"M5.64615 4.59906C5.05459 4.25752 4.29808 4.46015 3.95654 5.05171L2.69321 7.23986C2.35175 7.83128 2.5544 8.58754 3.14582 8.92899C3.97016 9.40493 3.97017 10.5948 3.14583 11.0707C2.55441 11.4122 2.35178 12.1684 2.69323 12.7598L3.95657 14.948C4.2981 15.5395 5.05461 15.7422 5.64617 15.4006C6.4706 14.9247 7.50129 15.5196 7.50129 16.4715C7.50129 17.1545 8.05496 17.7082 8.73794 17.7082H11.2649C11.9478 17.7082 12.5013 17.1545 12.5013 16.4717C12.5013 15.5201 13.5315 14.9251 14.3556 15.401C14.9469 15.7423 15.7029 15.5397 16.0443 14.9485L17.3079 12.7598C17.6494 12.1684 17.4467 11.4121 16.8553 11.0707C16.031 10.5948 16.031 9.40494 16.8554 8.92902C17.4468 8.58757 17.6494 7.83133 17.3079 7.23992L16.0443 5.05123C15.7029 4.45996 14.9469 4.25737 14.3556 4.59874C13.5315 5.07456 12.5013 4.47961 12.5013 3.52798C12.5013 2.84515 11.9477 2.2915 11.2649 2.2915L8.73795 2.2915C8.05496 2.2915 7.50129 2.84518 7.50129 3.52816C7.50129 4.48015 6.47059 5.07505 5.64615 4.59906Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12.5714 9.99977C12.5714 11.4196 11.4204 12.5706 10.0005 12.5706C8.58069 12.5706 7.42969 11.4196 7.42969 9.99977C7.42969 8.57994 8.58069 7.42894 10.0005 7.42894C11.4204 7.42894 12.5714 8.57994 12.5714 9.99977Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsx(f,{variant:"outline",size:"md",onClick:l,className:"shadow-theme-xs inline-flex h-11 items-center justify-center rounded-lg border border-gray-300 px-4 py-3 text-sm font-medium text-gray-700 dark:border-gray-700 dark:text-gray-400",children:"Details"})]}),e.jsx(De,{label:"",checked:g,disabled:N,onChange:w})]})]})}const K=({variant:t,title:s,message:a,showLink:r=!1,linkHref:i="#",linkText:l="Learn more"})=>{const n={success:{container:"border-b-2 border-success-500 bg-success-50 dark:border-success-500/30 dark:bg-success-500/15",icon:"text-success-500"},error:{container:"border-b-2 border-error-500 bg-error-50 dark:border-error-500/30 dark:bg-error-500/15",icon:"text-error-500"},warning:{container:"border-b-2 border-warning-500 bg-warning-50 dark:border-warning-500/30 dark:bg-warning-500/15",icon:"text-warning-500"},info:{container:"border-b-2 border-blue-light-500 bg-blue-light-50 dark:border-blue-light-500/30 dark:bg-blue-light-500/15",icon:"text-blue-light-500"}},x={success:e.jsx("svg",{className:"fill-current",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.70186 12.0001C3.70186 7.41711 7.41711 3.70186 12.0001 3.70186C16.5831 3.70186 20.2984 7.41711 20.2984 12.0001C20.2984 16.5831 16.5831 20.2984 12.0001 20.2984C7.41711 20.2984 3.70186 16.5831 3.70186 12.0001ZM12.0001 1.90186C6.423 1.90186 1.90186 6.423 1.90186 12.0001C1.90186 17.5772 6.423 22.0984 12.0001 22.0984C17.5772 22.0984 22.0984 17.5772 22.0984 12.0001C22.0984 6.423 17.5772 1.90186 12.0001 1.90186ZM15.6197 10.7395C15.9712 10.388 15.9712 9.81819 15.6197 9.46672C15.2683 9.11525 14.6984 9.11525 14.347 9.46672L11.1894 12.6243L9.6533 11.0883C9.30183 10.7368 8.73198 10.7368 8.38051 11.0883C8.02904 11.4397 8.02904 12.0096 8.38051 12.3611L10.553 14.5335C10.7217 14.7023 10.9507 14.7971 11.1894 14.7971C11.428 14.7971 11.657 14.7023 11.8257 14.5335L15.6197 10.7395Z"})}),error:e.jsx("svg",{className:"fill-current",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.3499 12.0004C20.3499 16.612 16.6115 20.3504 11.9999 20.3504C7.38832 20.3504 3.6499 16.612 3.6499 12.0004C3.6499 7.38881 7.38833 3.65039 11.9999 3.65039C16.6115 3.65039 20.3499 7.38881 20.3499 12.0004ZM11.9999 22.1504C17.6056 22.1504 22.1499 17.6061 22.1499 12.0004C22.1499 6.3947 17.6056 1.85039 11.9999 1.85039C6.39421 1.85039 1.8499 6.3947 1.8499 12.0004C1.8499 17.6061 6.39421 22.1504 11.9999 22.1504ZM13.0008 16.4753C13.0008 15.923 12.5531 15.4753 12.0008 15.4753L11.9998 15.4753C11.4475 15.4753 10.9998 15.923 10.9998 16.4753C10.9998 17.0276 11.4475 17.4753 11.9998 17.4753L12.0008 17.4753C12.5531 17.4753 13.0008 17.0276 13.0008 16.4753ZM11.9998 6.62898C12.414 6.62898 12.7498 6.96476 12.7498 7.37898L12.7498 13.0555C12.7498 13.4697 12.414 13.8055 11.9998 13.8055C11.5856 13.8055 11.2498 13.4697 11.2498 13.0555L11.2498 7.37898C11.2498 6.96476 11.5856 6.62898 11.9998 6.62898Z",fill:"#F04438"})}),warning:e.jsx("svg",{className:"fill-current",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6501 12.0001C3.6501 7.38852 7.38852 3.6501 12.0001 3.6501C16.6117 3.6501 20.3501 7.38852 20.3501 12.0001C20.3501 16.6117 16.6117 20.3501 12.0001 20.3501C7.38852 20.3501 3.6501 16.6117 3.6501 12.0001ZM12.0001 1.8501C6.39441 1.8501 1.8501 6.39441 1.8501 12.0001C1.8501 17.6058 6.39441 22.1501 12.0001 22.1501C17.6058 22.1501 22.1501 17.6058 22.1501 12.0001C22.1501 6.39441 17.6058 1.8501 12.0001 1.8501ZM10.9992 7.52517C10.9992 8.07746 11.4469 8.52517 11.9992 8.52517H12.0002C12.5525 8.52517 13.0002 8.07746 13.0002 7.52517C13.0002 6.97289 12.5525 6.52517 12.0002 6.52517H11.9992C11.4469 6.52517 10.9992 6.97289 10.9992 7.52517ZM12.0002 17.3715C11.586 17.3715 11.2502 17.0357 11.2502 16.6215V10.945C11.2502 10.5308 11.586 10.195 12.0002 10.195C12.4144 10.195 12.7502 10.5308 12.7502 10.945V16.6215C12.7502 17.0357 12.4144 17.3715 12.0002 17.3715Z",fill:""})}),info:e.jsx("svg",{className:"fill-current",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6501 11.9996C3.6501 7.38803 7.38852 3.64961 12.0001 3.64961C16.6117 3.64961 20.3501 7.38803 20.3501 11.9996C20.3501 16.6112 16.6117 20.3496 12.0001 20.3496C7.38852 20.3496 3.6501 16.6112 3.6501 11.9996ZM12.0001 1.84961C6.39441 1.84961 1.8501 6.39392 1.8501 11.9996C1.8501 17.6053 6.39441 22.1496 12.0001 22.1496C17.6058 22.1496 22.1501 17.6053 22.1501 11.9996C22.1501 6.39392 17.6058 1.84961 12.0001 1.84961ZM10.9992 7.52468C10.9992 8.07697 11.4469 8.52468 11.9992 8.52468H12.0002C12.5525 8.52468 13.0002 8.07697 13.0002 7.52468C13.0002 6.9724 12.5525 6.52468 12.0002 6.52468H11.9992C11.4469 6.52468 10.9992 6.9724 10.9992 7.52468ZM12.0002 17.371C11.586 17.371 11.2502 17.0352 11.2502 16.621V10.9445C11.2502 10.5303 11.586 10.1945 12.0002 10.1945C12.4144 10.1945 12.7502 10.5303 12.7502 10.9445V16.621C12.7502 17.0352 12.4144 17.371 12.0002 17.371Z",fill:""})})};return e.jsx("div",{className:`rounded-xl p-4 ${n[t].container}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`-mt-0.5 ${n[t].icon}`,children:x[t]}),e.jsxs("div",{children:[e.jsx("h4",{className:"mb-1 text-sm font-semibold text-gray-800 dark:text-white/90",children:s}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 whitespace-pre-line",children:a}),r&&e.jsx(_t,{to:i,className:"inline-block mt-3 text-sm font-medium text-gray-500 underline dark:text-gray-400",children:l})]})]})})},Ie=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("path",{d:"M12.321 24.9775C11.9035 24.3455 12.9535 23.389 12.5264 22.5859C12.2802 22.1227 11.8779 21.8341 11.3946 21.7735C10.9308 21.7153 10.4531 21.8851 10.1486 22.2169C9.66775 22.7401 9.59299 23.4523 9.68599 23.7043C9.72002 23.7967 9.77351 23.8219 9.81181 23.8273C10.0737 23.8618 10.221 23.1897 10.3115 23.0497C10.5614 22.6639 11.129 22.5471 11.5211 22.8007C12.2643 23.2814 11.6198 24.0584 11.6754 24.7147C11.7295 25.3537 12.1277 25.6105 12.4851 25.6375C12.8328 25.6507 13.0759 25.4575 13.1373 25.3165C13.2845 24.9799 12.6644 25.4975 12.321 24.9775Z",fill:"#0C111D"}),e.jsx("path",{d:"M27.8512 19.1761C27.6563 19.1492 27.4432 19.1498 27.2215 19.1761C27.0532 18.9637 26.9024 18.6199 26.8173 18.2185C26.6659 17.5045 26.6817 16.9873 27.1042 16.9201C27.5266 16.8529 27.7309 17.2849 27.8822 17.9989C27.9837 18.4789 27.9643 18.9199 27.8512 19.1761Z",fill:"#0C111D"}),e.jsx("path",{d:"M23.2243 19.6009C23.241 19.7626 23.2469 19.9262 23.2422 20.0769C23.6509 20.1009 23.9405 20.295 24.0175 20.4182C24.0571 20.4818 24.0412 20.5232 24.0285 20.5424C23.9862 20.6082 23.8955 20.598 23.7055 20.5767C23.5396 20.5581 23.3609 20.5417 23.1752 20.5503C23.0742 20.8602 22.7745 20.8892 22.564 20.66C22.417 20.7048 22.1281 20.8892 22.0421 20.6888C22.0413 20.5893 22.1453 20.4447 22.3337 20.317C22.2051 20.0718 22.1189 19.8092 22.068 19.5373C21.801 19.5854 21.5607 19.6602 21.3725 19.7188C21.284 19.7464 20.9343 19.9044 20.8933 19.7263C20.8659 19.6033 21.0574 19.4005 21.2598 19.2541C21.486 19.0935 21.7369 18.9794 21.997 18.9135C21.9914 18.5263 22.0902 18.2561 22.3716 18.2113C22.7204 18.1558 22.9366 18.4244 23.0863 18.9218C23.5079 19.0389 23.9289 19.3294 24.1148 19.6297C24.1871 19.7461 24.2011 19.8361 24.1543 19.8835C24.0375 20.0046 23.3901 19.6535 23.2243 19.6009Z",fill:"#0C111D"}),e.jsx("path",{d:"M25.9967 21.3415C26.2641 21.4711 26.5583 21.4201 26.6544 21.2275C26.7504 21.0349 26.6112 20.7739 26.3438 20.6443C26.0763 20.5147 25.7821 20.5657 25.6861 20.7583C25.5901 20.9509 25.7292 21.2119 25.9967 21.3415Z",fill:"#0C111D"}),e.jsx("path",{d:"M27.3132 20.3851C27.3181 20.0905 27.4986 19.8553 27.7156 19.8589C27.9326 19.8631 28.1046 20.1043 28.0998 20.3983C28.0949 20.6923 27.9144 20.9275 27.6974 20.9239C27.4804 20.9203 27.3084 20.6791 27.3132 20.3851Z",fill:"#0C111D"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.1978 23.9929C33.196 23.9868 33.202 24.0079 33.1978 23.9929C33.6336 23.9929 34.318 24.4873 34.318 25.6819C34.318 26.8705 33.8184 28.2169 33.7004 28.5157C31.9006 32.7733 27.605 35.1433 22.4882 34.9933C17.7179 34.8535 13.6497 32.3689 11.8693 28.3183C10.7928 28.3195 9.68291 27.8521 8.83923 27.1141C7.94996 26.3365 7.40169 25.3303 7.29471 24.2809C7.21144 23.4637 7.31294 22.7035 7.57249 22.0405L6.5726 21.2041C1.99679 17.3906 16.3084 1.68861 20.8854 5.6294C20.9085 5.6492 22.4427 7.13479 22.4463 7.13839C24.6532 6.21344 30.5665 4.45236 30.5731 8.55199C30.5755 9.91338 29.6966 11.501 28.2882 12.9416C29.9158 14.4315 29.4867 16.5479 29.7458 18.4897L30.3111 18.6445C31.3888 18.9427 32.1553 19.3405 32.5303 19.7293C32.9054 20.1175 33.0914 20.4937 33.1589 20.9347C33.2221 21.2905 33.2136 21.9187 32.7382 22.6213C32.9094 23.0746 33.0656 23.5264 33.1978 23.9929ZM11.7885 27.2137C11.9483 27.2173 12.107 27.2071 12.2626 27.1807C13.9347 26.8993 14.3724 25.1065 14.097 23.3461C13.7858 21.3583 12.4237 20.6575 11.4991 20.6077C11.242 20.5945 11.0031 20.6173 10.8062 20.6563C9.15591 20.9845 8.22409 22.3705 8.40766 24.1705C8.5736 25.7995 10.2427 27.1729 11.7885 27.2137ZM8.05086 21.1447C8.6046 20.3509 9.50967 19.7767 10.5369 19.5793C11.8444 16.115 14.0277 12.923 16.9174 10.7264C19.0619 8.96058 21.3747 7.69399 21.3747 7.69399C21.3747 7.69399 20.1292 6.26839 19.753 6.16339C17.4389 5.5466 12.4413 8.94858 9.25013 13.4438C7.95908 15.2624 6.11064 18.4831 6.99444 20.1397C7.10324 20.3449 7.7202 20.8723 8.05086 21.1447ZM26.8118 26.4181C26.8154 26.4553 26.7924 26.4937 26.7589 26.5075C26.7589 26.5075 24.8995 27.3613 21.9461 26.4595C22.0523 27.3448 23.1259 27.6803 23.8759 27.8017C27.5357 28.4233 30.9573 26.3575 31.7274 25.8373C31.8596 25.748 31.7258 25.9776 31.7019 26.0113C30.7591 27.2119 28.2244 28.6021 24.9269 28.6015C23.4888 28.6009 22.0512 28.1011 21.5236 27.3325C20.7048 26.1403 21.4829 24.3997 22.8475 24.5809C25.1541 24.838 27.5188 24.6448 29.6541 23.6665C31.5159 22.8133 32.2191 21.8749 32.1134 21.1147C31.9493 19.9366 30.2026 19.7524 29.3197 19.4659C28.9356 19.3405 28.7459 19.2403 28.7028 18.5269C28.6839 18.2155 28.6292 17.129 28.6092 16.6796C28.5739 15.893 28.4779 14.8172 27.802 14.3732C27.6257 14.2574 27.43 14.2016 27.2239 14.1908C27.0596 14.1829 26.9622 14.2055 26.9098 14.2176C26.8981 14.2204 26.8886 14.2226 26.8811 14.2238C26.5161 14.285 26.2925 14.4697 26.0287 14.6874C26.0135 14.7 25.9982 14.7126 25.9827 14.7254C25.1396 15.419 24.4279 15.5324 23.6358 15.4988C23.3892 15.4884 23.135 15.4638 22.8668 15.4378C22.6201 15.4139 22.3617 15.3889 22.0865 15.3728L21.7503 15.3536C20.424 15.2864 19.0017 16.4168 18.7652 18.0223C18.5011 19.8145 19.5028 20.9122 20.1542 21.6261C20.3152 21.8025 20.4548 21.9555 20.5486 22.0897C20.6088 22.1707 20.6787 22.2847 20.6787 22.3933C20.6787 22.5229 20.5936 22.6255 20.5103 22.7131C19.1573 24.0865 18.7245 26.2687 19.2345 28.0873C19.2983 28.3141 19.3792 28.5313 19.4746 28.7389C20.6708 31.4983 24.3823 32.7835 28.0074 31.6147C30.5481 30.7955 32.7929 28.8159 33.25 26.0851C33.3588 25.3735 33.199 25.0987 32.9814 24.9661C32.751 24.8263 32.475 24.8749 32.475 24.8749C32.475 24.8749 32.3492 24.0247 31.993 23.2519C30.936 24.0751 29.5756 24.6535 28.5399 24.9469C26.8804 25.4168 25.0879 25.5998 23.373 25.3782C22.6775 25.2883 22.2102 25.228 22.0099 25.8703C24.2972 26.6971 26.7182 26.3431 26.7182 26.3431C26.765 26.3383 26.8069 26.3719 26.8118 26.4181ZM20.2125 10.3736C18.9616 11.0054 17.5648 12.1304 16.4305 13.4246C16.3904 13.4708 16.45 13.5344 16.4992 13.499C17.479 12.7952 18.8224 12.1412 20.5821 11.7176C22.5533 11.243 24.451 11.4422 25.6101 11.7044C25.6685 11.7176 25.7049 11.6186 25.6533 11.5898C24.8874 11.1656 23.7118 10.8776 22.8779 10.8716C22.8371 10.871 22.814 10.8242 22.8384 10.7918C22.9824 10.6004 23.18 10.4114 23.3605 10.2746C23.4006 10.2434 23.3763 10.1792 23.3252 10.1822C22.2878 10.2451 19.9183 11.3255 19.9268 11.2862C19.9876 10.9982 20.1791 10.6178 20.2781 10.4402C20.3019 10.3982 20.2557 10.352 20.2125 10.3736Z",fill:"#0C111D"})]}),kt=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#625DF5"}),e.jsx("path",{d:"M20 12L28 20L20 28L12 20L20 12Z",fill:"white"})]});function cs(){var F,H;const t=q(),[s,a]=o.useState({openai:{id:"openai",enabled:!1,apiKey:"",model:"gpt-4.1"},runware:{id:"runware",enabled:!1,apiKey:""},image_generation:{id:"image_generation",enabled:!1,service:"openai",provider:"openai",model:"dall-e-3",runwareModel:"runware:97@1",image_type:"realistic",max_in_article_images:2,image_format:"webp",desktop_enabled:!0,mobile_enabled:!0}}),[r,i]=o.useState(null),[l,n]=o.useState(!1),[x,g]=o.useState(!1),[N,T]=o.useState(!1),[_,d]=o.useState(!1),[w,j]=o.useState({openai:"not_configured",runware:"not_configured",image_generation:"not_configured"}),S=o.useCallback(async(c,p,v,M)=>{const k="https://api.igny8.com/api";if(!["openai","runware"].includes(c))return;if(!(v&&v.trim()!=="")||!p){j(y=>({...y,[c]:"not_configured"}));return}j(y=>({...y,[c]:"pending"}));try{const y={apiKey:v};c==="openai"&&(y.config={model:M||"gpt-4.1",with_response:!1});const L=await fetch(`${k}/v1/system/settings/integrations/${c}/test/`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(y)}),G=await L.json();L.ok&&G.success?j(z=>({...z,[c]:"success"})):(console.error(`Validation failed for ${c}:`,G.error||G.message),j(z=>({...z,[c]:"error"})))}catch(y){console.error(`Error validating ${c}:`,y),j(L=>({...L,[c]:"error"}))}},[]),I=o.useCallback(async()=>{a(c=>(["openai","runware"].forEach(p=>{const v=c[p];if(!v)return;const M=v.enabled===!0,k=v.apiKey,b=v.model;S(p,M,k,b)}),c))},[S]);o.useEffect(()=>{h()},[]),o.useEffect(()=>{if(!Object.values(s).some(v=>v.apiKey!==void 0||v.enabled!==void 0))return;const p=setTimeout(()=>{I()},500);return()=>clearTimeout(p)},[s.openai.enabled,s.runware.enabled,s.openai.apiKey,s.runware.apiKey]);const h=async()=>{try{const c="https://api.igny8.com/api",v=["openai","runware","image_generation"].map(async k=>{try{const b=await fetch(`${c}/v1/system/settings/integrations/${k}/`,{credentials:"include"});if(b.ok){const y=await b.json();if(y.success&&y.data)return{id:k,config:y.data}}return{id:k,config:null}}catch(b){return console.error(`Error loading ${k} settings:`,b),{id:k,config:null}}}),M=await Promise.all(v);a(k=>{const b={...k};return M.forEach(({id:y,config:L})=>{L&&k[y]&&(b[y]={...k[y],...L,enabled:L.enabled!==void 0?L.enabled:k[y].enabled})}),b})}catch(c){console.error("Error loading integration settings:",c)}},O=c=>{i(c),g(!0)},$=c=>{i(c),n(!0)},Z=async()=>{if(!r)return;if(r!=="openai"&&r!=="runware"){t.warning("Connection testing is only available for OpenAI and Runware");return}const c=s[r],p=c.apiKey;if(!p){t.error("Please enter an API key first");return}d(!0),r&&j(v=>({...v,[r]:"pending"}));try{const v=await Y(`/v1/system/settings/integrations/${r}/test/`,{method:"POST",body:JSON.stringify({apiKey:p,config:c})});if(v.success)t.success(v.message||"API connection test successful!"),v.response&&t.info(`Response: ${v.response}`),v.tokens_used&&t.info(`Tokens used: ${v.tokens_used}`),r&&j(M=>({...M,[r]:"success"}));else throw new Error(v.error||"Connection test failed")}catch(v){console.error("Error testing connection:",v),t.error(`Connection test failed: ${v.message||"Unknown error"}`),r&&j(M=>({...M,[r]:"error"}))}finally{d(!1)}},W=async()=>{if(r){T(!0);try{const c=s[r];let p={...c};r==="image_generation"&&(p={...c,provider:c.service||c.provider||"openai",model:c.service==="openai"?c.model||"dall-e-3":c.service==="runware"?c.runwareModel||"runware:97@1":c.model,image_type:c.image_type||"realistic",max_in_article_images:c.max_in_article_images||2,image_format:c.image_format||"webp",desktop_enabled:c.desktop_enabled!==void 0?c.desktop_enabled:!0,mobile_enabled:c.mobile_enabled!==void 0?c.mobile_enabled:!0});const M=`https://api.igny8.com/api/v1/system/settings/integrations/${r}/save/`,k=await fetch(M,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(p)});if(!(k.headers.get("content-type")||"").includes("application/json")){const L=await k.text();if(L.trim().startsWith("<!DOCTYPE")||L.trim().startsWith("<html"))throw new Error(`Server returned HTML instead of JSON. This usually means the endpoint doesn't exist (404). Response: ${L.substring(0,200)}`)}let y;try{const L=await k.text();y=L?JSON.parse(L):{}}catch{const G=await k.text();throw new Error(`Failed to parse response as JSON. Response was: ${G.substring(0,200)}`)}if(!k.ok)throw new Error(y.error||`HTTP ${k.status}: ${k.statusText}`);if(y.success)t.success(y.message||"Settings saved successfully"),g(!1),setTimeout(()=>{h().then(()=>{setTimeout(()=>I(),300)}).catch(L=>{console.error("Error reloading settings after save:",L)})},100);else throw new Error(y.error||"Failed to save settings")}catch(c){console.error("Error saving integration settings:",c),t.error(`Failed to save settings: ${c.message||"Unknown error"}`)}finally{T(!1)}}},A=c=>{const p=s[c];if(c==="openai")return[{label:"App Name",value:"OpenAI API"},{label:"API Key",value:p.apiKey?`${p.apiKey.substring(0,20)}...`:"Not configured"},{label:"Model",value:p.model||"Not set"}];if(c==="runware")return[{label:"App Name",value:"Runware API"},{label:"API Key",value:p.apiKey?`${p.apiKey.substring(0,20)}...`:"Not configured"}];if(c==="image_generation"){const v=p.service||"openai",M=v==="openai"?p.model||"Not set":p.runwareModel||"Not set";return[{label:"Service",value:v==="openai"?"OpenAI":"Runware"},{label:"Model",value:M}]}return[]},R=o.useCallback(c=>{const p=s[c];if(c==="openai")return[{key:"apiKey",label:"OpenAI API Key",type:"password",value:p.apiKey||"",onChange:v=>{a({...s,[c]:{...p,apiKey:v}})},placeholder:"Enter your OpenAI API key",required:!0},{key:"model",label:"AI Model",type:"select",value:p.model||"gpt-4.1",onChange:v=>{a({...s,[c]:{...p,model:v}})},options:[{value:"gpt-4.1",label:"GPT-4.1 - $2.00 / $8.00 per 1M tokens"},{value:"gpt-4o-mini",label:"GPT-4o mini - $0.15 / $0.60 per 1M tokens"},{value:"gpt-4o",label:"GPT-4o - $2.50 / $10.00 per 1M tokens"}]}];if(c==="runware")return[{key:"apiKey",label:"Runware API Key",type:"password",value:p.apiKey||"",onChange:v=>{a({...s,[c]:{...p,apiKey:v}})},placeholder:"Enter your Runware API key",required:!0}];if(c==="image_generation"){const v=p.service||"openai",M=[{key:"service",label:"Image Generation Service",type:"select",value:v,onChange:k=>{a({...s,[c]:{...p,service:k,model:k==="openai"?"dall-e-3":void 0,runwareModel:k==="runware"?"runware:97@1":void 0}})},options:[{value:"openai",label:"OpenAI - Multiple models available"},{value:"runware",label:"Runware - $0.036 per image"}]}];return v==="openai"?M.push({key:"model",label:"OpenAI Image Model",type:"select",value:p.model||"dall-e-3",onChange:k=>{a({...s,[c]:{...p,model:k}})},options:[{value:"dall-e-3",label:"DALL·E 3 - $0.040 per image"},{value:"dall-e-2",label:"DALL·E 2 - $0.020 per image"}]}):v==="runware"&&M.push({key:"runwareModel",label:"Runware Model",type:"select",value:p.runwareModel||"runware:97@1",onChange:k=>{a({...s,[c]:{...p,runwareModel:k}})},options:[{value:"runware:97@1",label:"HiDream-I1 Full - $0.036 per image"},{value:"runware:gen3a_turbo",label:"Gen3a Turbo - $0.036 per image"},{value:"runware:gen3a",label:"Gen3a - $0.036 per image"}]}),M.push({key:"image_type",label:"Image Type",type:"select",value:p.image_type||"realistic",onChange:k=>{a({...s,[c]:{...p,image_type:k}})},options:[{value:"realistic",label:"Realistic"},{value:"artistic",label:"Artistic"},{value:"cartoon",label:"Cartoon"}]},{key:"max_in_article_images",label:"Max In-Article Images",type:"select",value:String(p.max_in_article_images||2),onChange:k=>{a({...s,[c]:{...p,max_in_article_images:parseInt(k)}})},options:[{value:"1",label:"1 Image"},{value:"2",label:"2 Images"},{value:"3",label:"3 Images"},{value:"4",label:"4 Images"},{value:"5",label:"5 Images"}]},{key:"image_format",label:"Image Format",type:"select",value:p.image_format||"webp",onChange:k=>{a({...s,[c]:{...p,image_format:k}})},options:[{value:"webp",label:"WEBP"},{value:"jpg",label:"JPG"},{value:"png",label:"PNG"}]}),M}return[]},[s]),U=o.useMemo(()=>{var c,p,v;if(!(r!=="image_generation"||!x))try{const M=R(r),k=M.find(D=>D.key==="service"),b=((c=s[r])==null?void 0:c.service)||"openai",y=M.find(D=>b==="openai"?D.key==="model":D.key==="runwareModel"),L=M.find(D=>D.key==="max_in_article_images"),G=M.find(D=>D.key==="image_type"),z=M.find(D=>D.key==="image_format");return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[k&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[k.label,k.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:k.options||[],placeholder:k.placeholder||k.label,value:k.value||"",onChange:D=>k.onChange(D),className:"w-full"})]}),y&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[y.label,y.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:y.options||[],placeholder:y.placeholder||y.label,value:y.value||"",onChange:D=>y.onChange(D),className:"w-full"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(J,{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Max Images"}),e.jsx("div",{className:"p-3 rounded-lg border border-gray-200 dark:border-gray-700 bg-gradient-to-r from-purple-500 to-blue-500 text-white",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:"Featured Image"}),e.jsx("div",{className:"text-xs opacity-90",children:"1280×832 pixels"})]}),e.jsx("div",{className:"text-xs bg-white/20 px-2 py-1 rounded",children:"Always Enabled"})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 dark:border-gray-700",children:[e.jsx(jt,{checked:((p=s[r])==null?void 0:p.desktop_enabled)!==!1,onChange:D=>{a({...s,[r]:{...s[r],desktop_enabled:D}})}}),e.jsxs("div",{children:[e.jsx(J,{className:"font-medium text-gray-700 dark:text-gray-300",children:"Desktop Images"}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"1024×1024 pixels"})]})]}),e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 dark:border-gray-700",children:[e.jsx(jt,{checked:((v=s[r])==null?void 0:v.mobile_enabled)!==!1,onChange:D=>{a({...s,[r]:{...s[r],mobile_enabled:D}})}}),e.jsxs("div",{children:[e.jsx(J,{className:"font-medium text-gray-700 dark:text-gray-300",children:"Mobile Images"}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"960×1280 pixels"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[L&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[L.label,L.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:L.options||[],placeholder:L.placeholder||L.label,value:L.value||"",onChange:D=>L.onChange(D),className:"w-full"})]}),G&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[G.label,G.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:G.options||[],placeholder:G.placeholder||G.label,value:G.value||"",onChange:D=>G.onChange(D),className:"w-full"})]}),z&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[z.label,z.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:z.options||[],placeholder:z.placeholder||z.label,value:z.value||"",onChange:D=>z.onChange(D),className:"w-full"})]})]})]})}catch(M){return console.error("Error rendering image generation form:",M),e.jsx("div",{className:"text-error-500",children:"Error loading form. Please refresh the page."})}},[r,s,x,R]);return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"API Integration - IGNY8",description:"External integrations"}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 xl:grid-cols-3",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsx(vt,{icon:e.jsx(Ie,{}),title:"OpenAI",description:"AI-powered content generation and analysis with DALL-E image generation",validationStatus:w.openai,integrationId:"openai",onToggleSuccess:(c,p)=>{const v=(p==null?void 0:p.apiKey)||s.openai.apiKey,M=(p==null?void 0:p.model)||s.openai.model;S("openai",c,v,M)},onSettings:()=>O("openai"),onDetails:()=>$("openai")}),e.jsx(wt,{title:"OpenAI API Validation",description:"Two-way response validation with actual request and response testing",integrationId:"openai",icon:e.jsx(Ie,{})})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsx(vt,{icon:e.jsx(kt,{}),title:"Runware",description:"High-quality AI image generation with Runware's models ($0.036 per image)",validationStatus:w.runware,integrationId:"runware",modelName:((F=s.image_generation)==null?void 0:F.service)==="runware"&&s.image_generation.runwareModel?{"runware:97@1":"HiDream-I1 Full","runware:gen3a_turbo":"Gen3a Turbo","runware:gen3a":"Gen3a"}[s.image_generation.runwareModel]||s.image_generation.runwareModel:void 0,onToggleSuccess:(c,p)=>{const v=(p==null?void 0:p.apiKey)||s.runware.apiKey;S("runware",c,v)},onSettings:()=>O("runware"),onDetails:()=>$("runware")}),e.jsx(wt,{title:"Runware API Validation",description:"Using 128x128 image generation request for connection testing",integrationId:"runware",icon:e.jsx(kt,{})})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsx(ds,{icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#9333EA"}),e.jsx("path",{d:"M12 16L20 10L28 16V28C28 28.5304 27.7893 29.0391 27.4142 29.4142C27.0391 29.7893 26.5304 30 26 30H14C13.4696 30 12.9609 29.7893 12.5858 29.4142C12.2107 29.0391 12 28.5304 12 28V16Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M16 30V20H24V30",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),title:"Image Generation Service",description:"Default image generation service and model selection for app-wide use",validationStatus:w.image_generation,onSettings:()=>O("image_generation"),onDetails:()=>$("image_generation")}),e.jsx(K,{variant:"info",title:"AI Integration & Image Generation Testing",message:`Configure and test your AI integrations on this page.
Set up OpenAI and Runware API keys, validate connections, and test image generation with different models and parameters.
Before you start, please read the documentation for each integration.
Make sure to use the correct API keys and models for each integration.`})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[e.jsx(ls,{title:"Generate Image",description:"Configure image generation parameters",integrationId:"openai",icon:e.jsx(Ie,{})}),e.jsx(os,{title:"Generated Image",description:"AI-generated image results",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#10B981"}),e.jsx("path",{d:"M12 16L20 10L28 16V28C28 28.5304 27.7893 29.0391 27.4142 29.4142C27.0391 29.7893 26.5304 30 26 30H14C13.4696 30 12.9609 29.7893 12.5858 29.4142C12.2107 29.0391 12 28.5304 12 28V16Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M16 30V20H24V30",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]}),e.jsx(ge,{isOpen:l,onClose:()=>n(!1),className:"max-w-2xl",children:e.jsxs("div",{className:"p-6",children:[e.jsx("h3",{className:"text-lg font-semibold mb-2 text-gray-800 dark:text-white",children:"Integration details"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-6",children:"Check the credentials and settings for your connected app."}),e.jsx("div",{className:"space-y-4",children:r&&A(r).map((c,p)=>e.jsxs("div",{className:"flex justify-between items-start border-b border-gray-200 dark:border-gray-700 pb-3",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:c.label}),e.jsx("span",{className:"text-sm text-gray-900 dark:text-white text-right max-w-xs break-words",children:c.value})]},p))}),e.jsx("div",{className:"flex justify-end mt-6",children:e.jsx(f,{variant:"outline",onClick:()=>n(!1),children:"Close"})})]})}),r&&e.jsx(e.Fragment,{children:e.jsx(ye,{isOpen:x,onClose:()=>g(!1),onSubmit:W,title:"Integration settings",fields:R(r),submitLabel:"Save Changes",cancelLabel:"Close",isLoading:N,customBody:U,customFooter:r==="openai"||r==="runware"?e.jsxs("div",{className:"flex justify-between items-center pt-4",children:[e.jsx(f,{type:"button",variant:"secondary",onClick:()=>{Z()},disabled:_||N||!((H=s[r])!=null&&H.apiKey),className:"flex items-center gap-2",children:_?"Testing...":"Test Connection"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{type:"button",variant:"outline",onClick:()=>g(!1),disabled:N||_,children:"Close"}),e.jsx(f,{type:"submit",variant:"primary",disabled:N||_,children:N?"Saving...":"Save Changes"})]})]}):void 0})})]})}const jr=Object.freeze(Object.defineProperty({__proto__:null,default:cs},Symbol.toStringTag,{value:"Module"}));function xs({site:t,icon:s,onToggle:a,onSettings:r,onDetails:i,isToggling:l=!1}){const n=T=>{a(t.id,T)},x=()=>t.is_active?"bg-green-500 dark:bg-green-600":"bg-gray-400 dark:bg-gray-500",N=t.is_active?{text:"Active",color:"text-green-600 dark:text-green-400",bold:!0}:{text:"Inactive",color:"text-gray-400 dark:text-gray-500",bold:!1};return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-9",children:[e.jsx("div",{className:"mb-5 inline-flex h-10 w-10 items-center justify-center",children:s}),e.jsx("h3",{className:"mb-3 text-lg font-semibold text-gray-800 dark:text-white/90",children:t.name}),e.jsx("p",{className:"max-w-xs text-sm text-gray-500 dark:text-gray-400 mb-2",children:t.description||"No description"}),t.domain&&e.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500 mb-2",children:t.domain}),e.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[t.industry_name&&e.jsx(C,{variant:"light",color:"info",className:"text-xs",children:t.industry_name}),e.jsxs(C,{variant:"light",color:"info",className:"text-xs",children:[t.active_sectors_count," / 5 Sectors"]}),t.status&&e.jsx(C,{variant:"light",color:t.status==="active"?"success":"dark",className:"text-xs",children:t.status})]}),e.jsxs("div",{className:"absolute top-5 right-5 flex items-center gap-2",children:[e.jsx("span",{className:`text-sm ${N.color} ${N.bold?"font-bold":""} transition-colors duration-200`,children:N.text}),e.jsx("div",{className:`w-[25px] h-[25px] rounded-full ${x()} transition-colors duration-200`,title:t.is_active?"Active site":"Inactive site"})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 p-5 dark:border-gray-800",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{variant:"outline",size:"md",onClick:()=>r(t),className:"shadow-theme-xs inline-flex h-11 w-11 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[e.jsx("path",{d:"M5.64615 4.59906C5.05459 4.25752 4.29808 4.46015 3.95654 5.05171L2.69321 7.23986C2.35175 7.83128 2.5544 8.58754 3.14582 8.92899C3.97016 9.40493 3.97017 10.5948 3.14583 11.0707C2.55441 11.4122 2.35178 12.1684 2.69323 12.7598L3.95657 14.948C4.2981 15.5395 5.05461 15.7422 5.64617 15.4006C6.4706 14.9247 7.50129 15.5196 7.50129 16.4715C7.50129 17.1545 8.05496 17.7082 8.73794 17.7082H11.2649C11.9478 17.7082 12.5013 17.1545 12.5013 16.4717C12.5013 15.5201 13.5315 14.9251 14.3556 15.401C14.9469 15.7423 15.7029 15.5397 16.0443 14.9485L17.3079 12.7598C17.6494 12.1684 17.4467 11.4121 16.8553 11.0707C16.031 10.5948 16.031 9.40494 16.8554 8.92902C17.4468 8.58757 17.6494 7.83133 17.3079 7.23992L16.0443 5.05123C15.7029 4.45996 14.9469 4.25737 14.3556 4.59874C13.5315 5.07456 12.5013 4.47961 12.5013 3.52798C12.5013 2.84515 11.9477 2.2915 11.2649 2.2915L8.73795 2.2915C8.05496 2.2915 7.50129 2.84518 7.50129 3.52816C7.50129 4.48015 6.47059 5.07505 5.64615 4.59906Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12.5714 9.99977C12.5714 11.4196 11.4204 12.5706 10.0005 12.5706C8.58069 12.5706 7.42969 11.4196 7.42969 9.99977C7.42969 8.57994 8.58069 7.42894 10.0005 7.42894C11.4204 7.42894 12.5714 8.57994 12.5714 9.99977Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsx(f,{variant:"outline",size:"md",onClick:()=>i(t),className:"shadow-theme-xs inline-flex h-11 items-center justify-center rounded-lg border border-gray-300 px-4 py-3 text-sm font-medium text-gray-700 dark:border-gray-700 dark:text-gray-400",children:"Details"})]}),e.jsx(De,{label:"",checked:t.is_active,disabled:l,onChange:n})]})]})}const Nt=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#3B82F6"}),e.jsx("path",{d:"M12 16L20 10L28 16V28C28 28.5304 27.7893 29.0391 27.4142 29.4142C27.0391 29.7893 26.5304 30 26 30H14C13.4696 30 12.9609 29.7893 12.5858 29.4142C12.2107 29.0391 12 28.5304 12 28V16Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M16 30V20H24V30",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});function ms(){var ce;const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0),[l,n]=o.useState(null),[x,g]=o.useState(!1),[N,T]=o.useState(!1),[_,d]=o.useState(!1),[w,j]=o.useState(!1),[S,I]=o.useState(null),[h,O]=o.useState([]),[$,Z]=o.useState(""),[W,A]=o.useState([]),[R,U]=o.useState(!1),[F,H]=o.useState({name:"",domain:"",description:"",is_active:!0});o.useEffect(()=>{c(),p()},[]);const c=async()=>{try{i(!0);const m=await Et();a(m.results||[])}catch(m){t.error(`Failed to load sites: ${m.message}`)}finally{i(!1)}},p=async()=>{try{const m=await Tt();O(m.industries||[])}catch(m){t.error(`Failed to load industries: ${m.message}`)}},v=async(m,V)=>{if(S!==null){t.error("Please wait for the current operation to complete");return}try{I(m),V?(await ft(m),t.success("Site activated successfully")):s.find(te=>te.id===m)&&(await Ne(m,{is_active:!1}),t.success("Site deactivated successfully")),await c()}catch(Q){t.error(`Failed to update site: ${Q.message}`)}finally{I(null)}},M=m=>{n(m),T(!0),k(m)},k=async m=>{try{const Q=(await zt(m.id)).map(te=>te.slug);if(A(Q),m.industry_slug)Z(m.industry_slug);else for(const te of h)if(te.sectors.filter(pe=>Q.includes(pe.slug)).length>0){Z(te.slug);break}}catch(V){console.error("Failed to load site sectors:",V)}},b=m=>{n(m),H({name:m.name||"",domain:m.domain||"",description:m.description||"",is_active:m.is_active||!1}),d(!0)},y=async()=>{if(l)try{j(!0);const m={...F,domain:F.domain?G(F.domain):F.domain};await Ne(l.id,m),t.success("Site updated successfully"),d(!1),await c()}catch(m){t.error(`Failed to update site: ${m.message}`)}finally{j(!1)}},L=()=>{n(null),H({name:"",domain:"",description:"",is_active:!0}),g(!0)},G=m=>{if(!m||!m.trim())return m;const V=m.trim();return V.startsWith("https://")?V:V.startsWith("http://")?V.replace("http://","https://"):`https://${V}`},z=async()=>{try{j(!0);const m={...F,domain:F.domain?G(F.domain):F.domain};if(l)await Ne(l.id,m),t.success("Site updated successfully");else{const V=await Bt({...m,is_active:m.is_active||!1});t.success("Site created successfully"),(s.length===0||m.is_active)&&await ft(V.id)}g(!1),n(null),H({name:"",domain:"",description:"",is_active:!1}),await c()}catch(m){t.error(`Failed to save site: ${m.message}`)}finally{j(!1)}},D=async()=>{if(!l||!$||W.length===0){t.error("Please select an industry and at least one sector");return}if(W.length>5){t.error("Maximum 5 sectors allowed per site");return}try{U(!0);const m=await Gt(l.id,$,W);t.success(m.message||"Sectors selected successfully"),T(!1),await c()}catch(m){t.error(`Failed to select sectors: ${m.message}`)}finally{U(!1)}},ue=async m=>{if(window.confirm(`Are you sure you want to delete "${m.name}"? This action cannot be undone.`))try{await Wt(m.id),t.success("Site deleted successfully"),await c(),_&&d(!1)}catch(V){t.error(`Failed to delete site: ${V.message}`)}},de=()=>[{key:"name",label:"Site Name",type:"text",value:F.name,onChange:m=>H({...F,name:m}),required:!0,placeholder:"Enter site name"},{key:"domain",label:"Domain",type:"text",value:F.domain,onChange:m=>H({...F,domain:m}),required:!1,placeholder:"example.com (https:// will be added automatically)"},{key:"description",label:"Description",type:"textarea",value:F.description,onChange:m=>H({...F,description:m}),required:!1,placeholder:"Enter site description",rows:4},{key:"is_active",label:"Set as Active Site",type:"select",value:F.is_active?"true":"false",onChange:m=>H({...F,is_active:m==="true"}),required:!1,options:[{value:"true",label:"Active"},{value:"false",label:"Inactive"}]}],he=()=>{if(!$)return[];const m=h.find(V=>V.slug===$);return(m==null?void 0:m.sectors)||[]};return r?e.jsx("div",{className:"flex h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mb-4 h-8 w-8 animate-spin rounded-full border-4 border-gray-300 border-t-blue-600 mx-auto"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Loading sites..."})]})}):e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"Sites Management",description:"Manage your sites and configure industries and sectors"}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Sites Management"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"Manage your sites, configure industries, and select sectors. Multiple sites can be active simultaneously."})]}),e.jsx(f,{onClick:L,variant:"primary",children:"+ Add Site"})]}),e.jsx(K,{variant:"info",title:"Sites Configuration",message:"Each site can have up to 5 sectors selected from 15 major industries. Keywords and clusters are automatically associated with sectors. Multiple sites can be active simultaneously."}),s.length===0?e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white p-12 text-center dark:border-gray-800 dark:bg-white/3",children:[e.jsx(Nt,{}),e.jsx("h3",{className:"mt-4 text-lg font-semibold text-gray-900 dark:text-white",children:"No sites yet"}),e.jsx("p",{className:"mt-2 text-sm text-gray-500 dark:text-gray-400",children:"Create your first site to get started"}),e.jsx(f,{onClick:L,variant:"primary",className:"mt-4",children:"Create Site"})]}):e.jsx("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 xl:grid-cols-3",children:s.map(m=>e.jsx(xs,{site:m,icon:e.jsx(Nt,{}),onToggle:v,onSettings:M,onDetails:b,isToggling:S===m.id},m.id))}),e.jsx(ye,{isOpen:x,onClose:()=>{g(!1),n(null),H({name:"",domain:"",description:"",is_active:!1})},onSubmit:z,title:l?"Edit Site":"Create New Site",submitLabel:l?"Update Site":"Create Site",fields:de(),isLoading:w}),e.jsx(ye,{isOpen:N,onClose:()=>T(!1),onSubmit:D,title:l?`Configure Sectors for ${l.name}`:"Configure Sectors",submitLabel:R?"Saving...":"Save Sectors",cancelLabel:"Cancel",isLoading:R,className:"max-w-2xl",customBody:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Industry"}),e.jsxs("select",{value:$,onChange:m=>{Z(m.target.value),A([])},className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",children:[e.jsx("option",{value:"",children:"Select an industry..."}),h.map(m=>e.jsx("option",{value:m.slug,children:m.name},m.slug))]}),$&&e.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:(ce=h.find(m=>m.slug===$))==null?void 0:ce.description})]}),$&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Sectors (max 5)"}),e.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto border border-gray-200 rounded-lg p-4 dark:border-gray-700",children:he().map(m=>e.jsxs("label",{className:"flex items-start space-x-3 p-3 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:W.includes(m.slug),onChange:V=>{if(V.target.checked){if(W.length>=5){t.error("Maximum 5 sectors allowed per site");return}A([...W,m.slug])}else A(W.filter(Q=>Q!==m.slug))},className:"mt-1 h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-sm text-gray-900 dark:text-white",children:m.name}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:m.description})]})]},m.slug))}),e.jsxs("p",{className:"mt-2 text-xs text-gray-500 dark:text-gray-400",children:["Selected: ",W.length," / 5 sectors"]})]})]}),customFooter:e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-gray-200 dark:border-gray-700",children:[e.jsx(f,{type:"button",variant:"outline",onClick:()=>T(!1),disabled:R,children:"Cancel"}),e.jsx(f,{type:"submit",variant:"primary",disabled:!$||W.length===0||R,children:R?"Saving...":"Save Sectors"})]})}),l&&e.jsx(ye,{isOpen:_,onClose:()=>{d(!1),n(null)},onSubmit:y,title:`Edit Site: ${l.name}`,submitLabel:"Save Changes",fields:de(),isLoading:w,customFooter:e.jsxs("div",{className:"flex justify-between items-center pt-4 border-t border-gray-200 dark:border-gray-700",children:[e.jsx(f,{variant:"danger",onClick:()=>{l&&ue(l)},disabled:w,children:"Delete Site"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{variant:"outline",onClick:()=>{d(!1),n(null)},disabled:w,children:"Cancel"}),e.jsx(f,{variant:"primary",onClick:y,disabled:w,children:w?"Saving...":"Save Changes"})]})]})})]})]})}const yr=Object.freeze(Object.defineProperty({__proto__:null,default:ms},Symbol.toStringTag,{value:"Module"}));function gs(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"Import/Export - IGNY8",description:"Data management"}),e.jsx(u,{title:"Coming Soon",desc:"Data management",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Import/Export - Coming Soon"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Import and export data, manage backups, and transfer content"})]})})]})}const vr=Object.freeze(Object.defineProperty({__proto__:null,default:gs},Symbol.toStringTag,{value:"Module"}));function us(){const[t,s]=o.useState([]),a=i=>{const l={success:"Success!",error:"Error Occurred",warning:"Warning",info:"Information"},n={success:"Operation completed successfully.",error:"Something went wrong. Please try again.",warning:"Please review this action carefully.",info:"Here's some useful information for you."},x={id:Date.now(),variant:i,title:l[i],message:n[i]};s(g=>[...g,x]),setTimeout(()=>{s(g=>g.filter(N=>N.id!==x.id))},5e3)},r=i=>{s(l=>l.filter(n=>n.id!==i))};return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Alerts Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Alerts Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsxs(u,{title:"Interactive Notifications",desc:"Click buttons to add notifications",children:[e.jsxs("div",{className:"flex flex-wrap gap-3 mb-4",children:[e.jsx(f,{onClick:()=>a("success"),variant:"primary",children:"Add Success"}),e.jsx(f,{onClick:()=>a("error"),variant:"primary",children:"Add Error"}),e.jsx(f,{onClick:()=>a("warning"),variant:"primary",children:"Add Warning"}),e.jsx(f,{onClick:()=>a("info"),variant:"primary",children:"Add Info"}),t.length>0&&e.jsx(f,{onClick:()=>s([]),variant:"outline",children:"Clear All"})]}),e.jsx("div",{className:"fixed top-4 right-4 z-50 space-y-2 max-w-md w-full pointer-events-none",children:t.map(i=>e.jsx("div",{className:"pointer-events-auto animate-in slide-in-from-top duration-300",children:e.jsxs("div",{className:"relative",children:[e.jsx(K,{variant:i.variant,title:i.title,message:i.message,showLink:!1}),e.jsx("button",{onClick:()=>r(i.id),className:"absolute top-2 right-2 p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},i.id))})]}),e.jsx(u,{title:"Success Alert",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(K,{variant:"success",title:"Success Message",message:"Operation completed successfully.",showLink:!0,linkHref:"/",linkText:"Learn more"}),e.jsx(K,{variant:"success",title:"Success Message",message:"Your changes have been saved.",showLink:!1})]})}),e.jsx(u,{title:"Warning Alert",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(K,{variant:"warning",title:"Warning Message",message:"Be cautious when performing this action.",showLink:!0,linkHref:"/",linkText:"Learn more"}),e.jsx(K,{variant:"warning",title:"Warning Message",message:"This action cannot be undone.",showLink:!1})]})}),e.jsx(u,{title:"Error Alert",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(K,{variant:"error",title:"Error Message",message:"Something went wrong. Please try again.",showLink:!0,linkHref:"/",linkText:"Learn more"}),e.jsx(K,{variant:"error",title:"Error Message",message:"Failed to save changes. Please check your connection.",showLink:!1})]})}),e.jsx(u,{title:"Info Alert",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(K,{variant:"info",title:"Info Message",message:"Here's some useful information for you.",showLink:!0,linkHref:"/",linkText:"Learn more"}),e.jsx(K,{variant:"info",title:"Info Message",message:"New features are available. Check them out!",showLink:!1})]})})]})]})}const wr=Object.freeze(Object.defineProperty({__proto__:null,default:us},Symbol.toStringTag,{value:"Module"})),hs={xsmall:"h-6 w-6 max-w-6",small:"h-8 w-8 max-w-8",medium:"h-10 w-10 max-w-10",large:"h-12 w-12 max-w-12",xlarge:"h-14 w-14 max-w-14",xxlarge:"h-16 w-16 max-w-16"},ps={xsmall:"h-1.5 w-1.5 max-w-1.5",small:"h-2 w-2 max-w-2",medium:"h-2.5 w-2.5 max-w-2.5",large:"h-3 w-3 max-w-3",xlarge:"h-3.5 w-3.5 max-w-3.5",xxlarge:"h-4 w-4 max-w-4"},bs={online:"bg-success-500",offline:"bg-error-400",busy:"bg-warning-500"},B=({src:t,alt:s="User Avatar",size:a="medium",status:r="none"})=>e.jsxs("div",{className:`relative rounded-full ${hs[a]}`,children:[e.jsx("img",{src:t,alt:s,className:"object-cover rounded-full"}),r!=="none"&&e.jsx("span",{className:`absolute bottom-0 right-0 rounded-full border-[1.5px] border-white dark:border-gray-900 ${ps[a]} ${bs[r]||""}`})]});function fs(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Avatars Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Avatars Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Default Avatar",children:e.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 sm:flex-row",children:[e.jsx(B,{src:"/images/user/user-01.jpg",size:"xsmall"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"small"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"medium"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"large"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"xlarge"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"xxlarge"})]})}),e.jsx(u,{title:"Avatar with online indicator",children:e.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 sm:flex-row",children:[e.jsx(B,{src:"/images/user/user-01.jpg",size:"xsmall",status:"online"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"small",status:"online"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"medium",status:"online"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"large",status:"online"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"xlarge",status:"online"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"xxlarge",status:"online"})]})}),e.jsx(u,{title:"Avatar with Offline indicator",children:e.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 sm:flex-row",children:[e.jsx(B,{src:"/images/user/user-01.jpg",size:"xsmall",status:"offline"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"small",status:"offline"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"medium",status:"offline"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"large",status:"offline"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"xlarge",status:"offline"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"xxlarge",status:"offline"})]})})," ",e.jsx(u,{title:"Avatar with busy indicator",children:e.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 sm:flex-row",children:[e.jsx(B,{src:"/images/user/user-01.jpg",size:"xsmall",status:"busy"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"small",status:"busy"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"medium",status:"busy"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"large",status:"busy"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"xlarge",status:"busy"}),e.jsx(B,{src:"/images/user/user-01.jpg",size:"xxlarge",status:"busy"})]})})]})]})}const kr=Object.freeze(Object.defineProperty({__proto__:null,default:fs},Symbol.toStringTag,{value:"Module"}));function js(){return e.jsxs("div",{children:[e.jsx(P,{title:"React.js Badges Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Badges Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"With Light Background",children:e.jsxs("div",{className:"flex flex-wrap gap-4 sm:items-center sm:justify-center",children:[e.jsx(C,{variant:"light",color:"primary",children:"Primary"}),e.jsx(C,{variant:"light",color:"success",children:"Success"})," ",e.jsx(C,{variant:"light",color:"error",children:"Error"})," ",e.jsx(C,{variant:"light",color:"warning",children:"Warning"})," ",e.jsx(C,{variant:"light",color:"info",children:"Info"}),e.jsx(C,{variant:"light",color:"light",children:"Light"}),e.jsx(C,{variant:"light",color:"dark",children:"Dark"})]})}),e.jsx(u,{title:"With Solid Background",children:e.jsxs("div",{className:"flex flex-wrap gap-4 sm:items-center sm:justify-center",children:[e.jsx(C,{variant:"solid",color:"primary",children:"Primary"}),e.jsx(C,{variant:"solid",color:"success",children:"Success"})," ",e.jsx(C,{variant:"solid",color:"error",children:"Error"})," ",e.jsx(C,{variant:"solid",color:"warning",children:"Warning"})," ",e.jsx(C,{variant:"solid",color:"info",children:"Info"}),e.jsx(C,{variant:"solid",color:"light",children:"Light"}),e.jsx(C,{variant:"solid",color:"dark",children:"Dark"})]})}),e.jsx(u,{title:"Light Background with Left Icon",children:e.jsxs("div",{className:"flex flex-wrap gap-4 sm:items-center sm:justify-center",children:[e.jsx(C,{variant:"light",color:"primary",startIcon:e.jsx(E,{}),children:"Primary"}),e.jsx(C,{variant:"light",color:"success",startIcon:e.jsx(E,{}),children:"Success"})," ",e.jsx(C,{variant:"light",color:"error",startIcon:e.jsx(E,{}),children:"Error"})," ",e.jsx(C,{variant:"light",color:"warning",startIcon:e.jsx(E,{}),children:"Warning"})," ",e.jsx(C,{variant:"light",color:"info",startIcon:e.jsx(E,{}),children:"Info"}),e.jsx(C,{variant:"light",color:"light",startIcon:e.jsx(E,{}),children:"Light"}),e.jsx(C,{variant:"light",color:"dark",startIcon:e.jsx(E,{}),children:"Dark"})]})}),e.jsx(u,{title:"Solid Background with Left Icon",children:e.jsxs("div",{className:"flex flex-wrap gap-4 sm:items-center sm:justify-center",children:[e.jsx(C,{variant:"solid",color:"primary",startIcon:e.jsx(E,{}),children:"Primary"}),e.jsx(C,{variant:"solid",color:"success",startIcon:e.jsx(E,{}),children:"Success"})," ",e.jsx(C,{variant:"solid",color:"error",startIcon:e.jsx(E,{}),children:"Error"})," ",e.jsx(C,{variant:"solid",color:"warning",startIcon:e.jsx(E,{}),children:"Warning"})," ",e.jsx(C,{variant:"solid",color:"info",startIcon:e.jsx(E,{}),children:"Info"}),e.jsx(C,{variant:"solid",color:"light",startIcon:e.jsx(E,{}),children:"Light"}),e.jsx(C,{variant:"solid",color:"dark",startIcon:e.jsx(E,{}),children:"Dark"})]})}),e.jsx(u,{title:"Light Background with Right Icon",children:e.jsxs("div",{className:"flex flex-wrap gap-4 sm:items-center sm:justify-center",children:[e.jsx(C,{variant:"light",color:"primary",endIcon:e.jsx(E,{}),children:"Primary"}),e.jsx(C,{variant:"light",color:"success",endIcon:e.jsx(E,{}),children:"Success"})," ",e.jsx(C,{variant:"light",color:"error",endIcon:e.jsx(E,{}),children:"Error"})," ",e.jsx(C,{variant:"light",color:"warning",endIcon:e.jsx(E,{}),children:"Warning"})," ",e.jsx(C,{variant:"light",color:"info",endIcon:e.jsx(E,{}),children:"Info"}),e.jsx(C,{variant:"light",color:"light",endIcon:e.jsx(E,{}),children:"Light"}),e.jsx(C,{variant:"light",color:"dark",endIcon:e.jsx(E,{}),children:"Dark"})]})}),e.jsx(u,{title:"Solid Background with Right Icon",children:e.jsxs("div",{className:"flex flex-wrap gap-4 sm:items-center sm:justify-center",children:[e.jsx(C,{variant:"solid",color:"primary",endIcon:e.jsx(E,{}),children:"Primary"}),e.jsx(C,{variant:"solid",color:"success",endIcon:e.jsx(E,{}),children:"Success"})," ",e.jsx(C,{variant:"solid",color:"error",endIcon:e.jsx(E,{}),children:"Error"})," ",e.jsx(C,{variant:"solid",color:"warning",endIcon:e.jsx(E,{}),children:"Warning"})," ",e.jsx(C,{variant:"solid",color:"info",endIcon:e.jsx(E,{}),children:"Info"}),e.jsx(C,{variant:"solid",color:"light",endIcon:e.jsx(E,{}),children:"Light"}),e.jsx(C,{variant:"solid",color:"dark",endIcon:e.jsx(E,{}),children:"Dark"})]})})]})]})}const Nr=Object.freeze(Object.defineProperty({__proto__:null,default:js},Symbol.toStringTag,{value:"Module"})),Ct=({items:t,className:s=""})=>e.jsx("nav",{className:s,children:e.jsx("ol",{className:"flex items-center gap-1.5",children:t.map((a,r)=>e.jsxs("li",{className:"flex items-center gap-1.5",children:[r>0&&e.jsx("svg",{className:"stroke-current text-gray-400",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",children:e.jsx("path",{d:"M6.0765 12.667L10.2432 8.50033L6.0765 4.33366",stroke:"",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}),a.path&&r<t.length-1?e.jsxs(_t,{to:a.path,className:"inline-flex items-center gap-1.5 text-sm text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",children:[a.icon&&e.jsx("span",{children:a.icon}),a.label]}):e.jsxs("span",{className:"text-sm text-gray-800 dark:text-white/90",children:[a.icon&&e.jsx("span",{className:"mr-1.5",children:a.icon}),a.label]})]},r))})});function ys(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Breadcrumb Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Breadcrumb Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Default Breadcrumb",children:e.jsx(Ct,{items:[{label:"Home",path:"/"},{label:"UI Elements",path:"/ui-elements"},{label:"Breadcrumb"}]})}),e.jsx(u,{title:"Breadcrumb with Icon",children:e.jsx(Ct,{items:[{label:"Home",path:"/",icon:e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"})})},{label:"UI Elements",path:"/ui-elements"},{label:"Breadcrumb"}]})})]})]})}const Cr=Object.freeze(Object.defineProperty({__proto__:null,default:ys},Symbol.toStringTag,{value:"Module"}));function vs(){return e.jsxs("div",{children:[e.jsx(P,{title:"React.js Buttons Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Buttons Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Primary Button",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(f,{size:"sm",variant:"primary",children:"Button Text"}),e.jsx(f,{size:"md",variant:"primary",children:"Button Text"})]})}),e.jsx(u,{title:"Primary Button with Left Icon",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(f,{size:"sm",variant:"primary",startIcon:e.jsx(ae,{className:"size-5"}),children:"Button Text"}),e.jsx(f,{size:"md",variant:"primary",startIcon:e.jsx(ae,{className:"size-5"}),children:"Button Text"})]})}),e.jsx(u,{title:"Primary Button with Right Icon",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(f,{size:"sm",variant:"primary",endIcon:e.jsx(ae,{className:"size-5"}),children:"Button Text"}),e.jsx(f,{size:"md",variant:"primary",endIcon:e.jsx(ae,{className:"size-5"}),children:"Button Text"})]})}),e.jsx(u,{title:"Secondary Button",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(f,{size:"sm",variant:"outline",children:"Button Text"}),e.jsx(f,{size:"md",variant:"outline",children:"Button Text"})]})}),e.jsx(u,{title:"Outline Button with Left Icon",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(f,{size:"sm",variant:"outline",startIcon:e.jsx(ae,{className:"size-5"}),children:"Button Text"}),e.jsx(f,{size:"md",variant:"outline",startIcon:e.jsx(ae,{className:"size-5"}),children:"Button Text"})]})})," ",e.jsx(u,{title:"Outline Button with Right Icon",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(f,{size:"sm",variant:"outline",endIcon:e.jsx(ae,{className:"size-5"}),children:"Button Text"}),e.jsx(f,{size:"md",variant:"outline",endIcon:e.jsx(ae,{className:"size-5"}),children:"Button Text"})]})})]})]})}const Sr=Object.freeze(Object.defineProperty({__proto__:null,default:vs},Symbol.toStringTag,{value:"Module"})),St=({children:t,className:s=""})=>e.jsx("div",{className:`inline-flex rounded-lg border border-gray-300 bg-white shadow-theme-xs dark:border-gray-700 dark:bg-gray-800 ${s}`,children:t}),oe=({children:t,onClick:s,isActive:a=!1,className:r="",disabled:i=!1})=>e.jsx("button",{onClick:s,disabled:i,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white disabled:opacity-50 disabled:cursor-not-allowed ${a?"bg-gray-100 text-gray-900 dark:bg-white/10 dark:text-white":""} ${r}`,type:"button",children:t});function ws(){const[t,s]=o.useState("left");return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Button Groups Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Button Groups Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Default Button Group",children:e.jsxs(St,{children:[e.jsx(oe,{isActive:t==="left",onClick:()=>s("left"),className:"rounded-l-lg border-l-0",children:"Left"}),e.jsx(oe,{isActive:t==="center",onClick:()=>s("center"),className:"border-l border-r border-gray-300 dark:border-gray-700",children:"Center"}),e.jsx(oe,{isActive:t==="right",onClick:()=>s("right"),className:"rounded-r-lg border-r-0",children:"Right"})]})}),e.jsx(u,{title:"Icon Button Group",children:e.jsxs(St,{children:[e.jsx(oe,{className:"rounded-l-lg border-l-0",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})}),e.jsx(oe,{className:"border-l border-r border-gray-300 dark:border-gray-700",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v12a1 1 0 11-2 0V4a1 1 0 011-1z",clipRule:"evenodd"})})}),e.jsx(oe,{className:"rounded-r-lg border-r-0",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M3 10a1 1 0 011 1h12a1 1 0 110-2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})})]})})]})]})}const Tr=Object.freeze(Object.defineProperty({__proto__:null,default:ws},Symbol.toStringTag,{value:"Module"}));function ks(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Cards Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Cards Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Basic Card",children:e.jsxs(ee,{children:[e.jsx(Ce,{children:"Card Title"}),e.jsx(Se,{children:"This is a basic card with title and description."})]})}),e.jsx(u,{title:"Card with Icon",children:e.jsxs(ee,{children:[e.jsx(Vt,{children:e.jsxs("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:[e.jsx("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),e.jsx("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm3 4a1 1 0 000 2h.01a1 1 0 100-2H7zm3 0a1 1 0 000 2h3a1 1 0 100-2h-3zm-3 4a1 1 0 100 2h.01a1 1 0 100-2H7zm3 0a1 1 0 100 2h3a1 1 0 100-2h-3z",clipRule:"evenodd"})]})}),e.jsx(Ce,{children:"Card with Icon"}),e.jsx(Se,{children:"This card includes an icon at the top."}),e.jsx(Ut,{children:"Learn More"})]})}),e.jsx(u,{title:"Card with Image",children:e.jsxs(ee,{children:[e.jsx("img",{src:"https://via.placeholder.com/400x200",alt:"Card",className:"w-full h-48 object-cover rounded-t-xl"}),e.jsx(Ce,{children:"Card with Image"}),e.jsx(Se,{children:"This card includes an image at the top."})]})})]})]})}const _r=Object.freeze(Object.defineProperty({__proto__:null,default:ks},Symbol.toStringTag,{value:"Module"}));function Ns(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Carousel Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Carousel Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsx("div",{className:"space-y-5 sm:space-y-6",children:e.jsx(u,{title:"Carousel",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Carousel component will be implemented here."})})})]})}const Lr=Object.freeze(Object.defineProperty({__proto__:null,default:Ns},Symbol.toStringTag,{value:"Module"}));function Cs(){const[t,s]=o.useState(!1),[a,r]=o.useState(!1),[i,l]=o.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Dropdowns Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Dropdowns Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Default Dropdown",children:e.jsxs("div",{className:"relative inline-block",children:[e.jsx(f,{onClick:()=>s(!t),children:"Dropdown Default"}),e.jsxs(Te,{isOpen:t,onClose:()=>s(!1),className:"w-48 p-2 mt-2",children:[e.jsx(ie,{onItemClick:()=>s(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:"Edit"}),e.jsx(ie,{onItemClick:()=>s(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:"Delete"})]})]})}),e.jsx(u,{title:"Dropdown with Divider",children:e.jsxs("div",{className:"relative inline-block",children:[e.jsx(f,{onClick:()=>r(!a),children:"Dropdown with Divider"}),e.jsxs(Te,{isOpen:a,onClose:()=>r(!1),className:"w-48 p-2 mt-2",children:[e.jsx(ie,{onItemClick:()=>r(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:"Edit"}),e.jsx(ie,{onItemClick:()=>r(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:"View"}),e.jsx("div",{className:"my-2 border-t border-gray-200 dark:border-gray-800"}),e.jsx(ie,{onItemClick:()=>r(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-red-600 rounded-lg text-theme-sm hover:bg-red-50 hover:text-red-700 dark:text-red-400 dark:hover:bg-red-900/20 dark:hover:text-red-300",children:"Delete"})]})]})}),e.jsx(u,{title:"Dropdown with Icon",children:e.jsxs("div",{className:"relative inline-block",children:[e.jsx(f,{onClick:()=>l(!i),children:"Dropdown with Icon"}),e.jsxs(Te,{isOpen:i,onClose:()=>l(!1),className:"w-48 p-2 mt-2",children:[e.jsxs(ie,{onItemClick:()=>l(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"})}),"Edit"]}),e.jsxs(ie,{onItemClick:()=>l(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"View"]}),e.jsx("div",{className:"my-2 border-t border-gray-200 dark:border-gray-800"}),e.jsxs(ie,{onItemClick:()=>l(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-red-600 rounded-lg text-theme-sm hover:bg-red-50 hover:text-red-700 dark:text-red-400 dark:hover:bg-red-900/20 dark:hover:text-red-300",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"})}),"Delete"]})]})]})})]})]})}const Ir=Object.freeze(Object.defineProperty({__proto__:null,default:Cs},Symbol.toStringTag,{value:"Module"}));function Ss(){return e.jsx("div",{className:"relative",children:e.jsx("div",{className:"overflow-hidden",children:e.jsx("img",{src:"/images/grid-image/image-01.png",alt:"Cover",className:"w-full border border-gray-200 rounded-xl dark:border-gray-800"})})})}function Ts(){return e.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2",children:[e.jsx("div",{children:e.jsx("img",{src:"/images/grid-image/image-02.png",alt:" grid",className:"border border-gray-200 rounded-xl dark:border-gray-800"})}),e.jsx("div",{children:e.jsx("img",{src:"/images/grid-image/image-03.png",alt:" grid",className:"border border-gray-200 rounded-xl dark:border-gray-800"})})]})}function _s(){return e.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-3",children:[e.jsx("div",{children:e.jsx("img",{src:"/images/grid-image/image-04.png",alt:" grid",className:"border border-gray-200 rounded-xl dark:border-gray-800"})}),e.jsx("div",{children:e.jsx("img",{src:"/images/grid-image/image-05.png",alt:" grid",className:"border border-gray-200 rounded-xl dark:border-gray-800"})}),e.jsx("div",{children:e.jsx("img",{src:"/images/grid-image/image-06.png",alt:" grid",className:"border border-gray-200 rounded-xl dark:border-gray-800"})})]})}function Ls(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Images Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Images page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Responsive image",children:e.jsx(Ss,{})}),e.jsx(u,{title:"Image in 2 Grid",children:e.jsx(Ts,{})}),e.jsx(u,{title:"Image in 3 Grid",children:e.jsx(_s,{})})]})]})}const Ar=Object.freeze(Object.defineProperty({__proto__:null,default:Ls},Symbol.toStringTag,{value:"Module"}));function Is(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Links Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Links Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsx("div",{className:"space-y-5 sm:space-y-6",children:e.jsx(u,{title:"Links",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{children:e.jsx("a",{href:"#",className:"text-brand-500 hover:text-brand-600 underline",children:"Primary Link"})}),e.jsx("div",{children:e.jsx("a",{href:"#",className:"text-gray-700 dark:text-gray-300 hover:text-brand-500 underline",children:"Default Link"})})]})})})]})}const Pr=Object.freeze(Object.defineProperty({__proto__:null,default:Is},Symbol.toStringTag,{value:"Module"})),Ae=({children:t,variant:s="unordered",className:a=""})=>{const r="rounded-lg border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03] sm:w-fit";return s==="ordered"?e.jsx("ol",{className:`flex flex-col list-decimal ${r} ${a}`,children:t}):s==="horizontal"?e.jsx("ul",{className:`flex flex-col md:flex-row ${r} ${a}`,children:t}):s==="button"?e.jsx("ul",{className:`w-full overflow-hidden rounded-lg border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03] sm:w-[228px] flex flex-col ${a}`,children:t}):e.jsx("ul",{className:`flex flex-col ${r} ${a}`,children:t})},re=({children:t,variant:s="unordered",onClick:a,disabled:r=!1,className:i=""})=>s==="button"?e.jsx("li",{className:`border-b border-gray-200 last:border-b-0 dark:border-gray-800 ${i}`,children:e.jsx("button",{className:`flex w-full items-center gap-3 px-3 py-2.5 text-sm font-medium text-gray-500 hover:bg-brand-50 hover:text-brand-500 dark:text-gray-400 dark:hover:bg-brand-500/[0.12] dark:hover:text-brand-400 ${r?"disabled:opacity-50":""}`,onClick:a,disabled:r,type:"button",children:t})}):s==="horizontal"?e.jsx("li",{className:`flex items-center gap-2 border-b border-gray-200 px-3 py-2.5 text-sm text-gray-500 last:border-0 dark:border-gray-800 dark:text-gray-400 md:border-b-0 md:border-r ${i}`,children:t}):e.jsx("li",{className:`flex items-center gap-2 border-b border-gray-200 px-3 py-2.5 text-sm text-gray-500 last:border-b-0 dark:border-gray-800 dark:text-gray-400 ${i}`,children:t});function As(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js List Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js List Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Unordered List",children:e.jsxs(Ae,{variant:"unordered",children:[e.jsx(re,{children:"Item 1"}),e.jsx(re,{children:"Item 2"}),e.jsx(re,{children:"Item 3"})]})}),e.jsx(u,{title:"Ordered List",children:e.jsxs(Ae,{variant:"ordered",children:[e.jsx(re,{children:"First Item"}),e.jsx(re,{children:"Second Item"}),e.jsx(re,{children:"Third Item"})]})}),e.jsx(u,{title:"Button List",children:e.jsxs(Ae,{variant:"button",children:[e.jsx(re,{variant:"button",onClick:()=>alert("Clicked Item 1"),children:"Button Item 1"}),e.jsx(re,{variant:"button",onClick:()=>alert("Clicked Item 2"),children:"Button Item 2"}),e.jsx(re,{variant:"button",onClick:()=>alert("Clicked Item 3"),children:"Button Item 3"})]})})]})]})}const Mr=Object.freeze(Object.defineProperty({__proto__:null,default:As},Symbol.toStringTag,{value:"Module"}));function Ps({isOpen:t,onClose:s,onConfirm:a,title:r,message:i,confirmText:l="Confirm",cancelText:n="Cancel",variant:x="danger",isLoading:g=!1}){return e.jsx(ge,{isOpen:t,onClose:s,className:"max-w-md",children:e.jsxs("div",{className:"p-6",children:[e.jsx("h2",{className:"text-xl font-bold mb-4 text-gray-800 dark:text-white",children:r}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:i}),e.jsxs("div",{className:"flex justify-end gap-4",children:[e.jsx(f,{variant:"outline",onClick:s,disabled:g,children:n}),e.jsx(f,{variant:"primary",onClick:a,disabled:g,children:g?"Processing...":l})]})]})})}function Ms(){const[t,s]=o.useState(!1),[a,r]=o.useState(!1),[i,l]=o.useState(!1),[n,x]=o.useState(!1),[g,N]=o.useState(!1),[T,_]=o.useState(!1),[d,w]=o.useState(!1),[j,S]=o.useState(!1),[I,h]=o.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Modals Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Modals Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsxs(u,{title:"Default Modal",children:[e.jsx(f,{onClick:()=>s(!0),children:"Open Default Modal"}),e.jsx(ge,{isOpen:t,onClose:()=>s(!1),className:"max-w-lg",children:e.jsxs("div",{className:"p-6",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Default Modal Title"}),e.jsx("p",{children:"This is a default modal. It can contain any content."}),e.jsxs("div",{className:"flex justify-end gap-4 mt-6",children:[e.jsx(f,{variant:"outline",onClick:()=>s(!1),children:"Close"}),e.jsx(f,{variant:"primary",children:"Save Changes"})]})]})})]}),e.jsxs(u,{title:"Centered Modal",children:[e.jsx(f,{onClick:()=>r(!0),children:"Open Centered Modal"}),e.jsx(ge,{isOpen:a,onClose:()=>r(!1),className:"max-w-md",children:e.jsxs("div",{className:"p-6 text-center",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Centered Modal Title"}),e.jsx("p",{children:"This modal is vertically and horizontally centered."}),e.jsx(f,{onClick:()=>r(!1),className:"mt-6",children:"Close"})]})})]}),e.jsxs(u,{title:"Full Screen Modal",children:[e.jsx(f,{onClick:()=>x(!0),children:"Open Full Screen Modal"}),e.jsx(ge,{isOpen:n,onClose:()=>x(!1),isFullscreen:!0,children:e.jsxs("div",{className:"p-6 bg-white dark:bg-gray-900 w-full h-full flex flex-col",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Full Screen Modal"}),e.jsx("p",{className:"flex-grow",children:"This modal takes up the entire screen. Useful for complex forms or detailed views."}),e.jsx(f,{onClick:()=>x(!1),className:"mt-6 self-end",children:"Close Full Screen"})]})})]}),e.jsxs(u,{title:"Confirmation Dialog",children:[e.jsx(f,{onClick:()=>N(!0),variant:"danger",children:"Open Confirmation Dialog"}),e.jsx(Ps,{isOpen:g,onClose:()=>N(!1),onConfirm:()=>{alert("Action Confirmed!"),N(!1)},title:"Confirm Action",message:"Are you sure you want to proceed with this action? It cannot be undone.",confirmText:"Proceed",variant:"danger"})]}),e.jsxs(u,{title:"Alert Modals",children:[e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx(f,{onClick:()=>_(!0),variant:"success",children:"Success Alert"}),e.jsx(f,{onClick:()=>w(!0),variant:"info",children:"Info Alert"}),e.jsx(f,{onClick:()=>S(!0),variant:"warning",children:"Warning Alert"}),e.jsx(f,{onClick:()=>h(!0),variant:"danger",children:"Danger Alert"})]}),e.jsx(be,{isOpen:T,onClose:()=>_(!1),title:"Success!",message:"Your operation was completed successfully.",variant:"success"}),e.jsx(be,{isOpen:d,onClose:()=>w(!1),title:"Information",message:"This is an informational message for the user.",variant:"info"}),e.jsx(be,{isOpen:j,onClose:()=>S(!1),title:"Warning!",message:"Please be careful, this action has consequences.",variant:"warning"}),e.jsx(be,{isOpen:I,onClose:()=>h(!1),title:"Danger!",message:"This is a critical alert. Proceed with caution.",variant:"danger"})]})]})]})}const Dr=Object.freeze(Object.defineProperty({__proto__:null,default:Ms},Symbol.toStringTag,{value:"Module"}));function Ds(){const t=q(),[s,a]=o.useState(!0),[r,i]=o.useState(!0),[l,n]=o.useState(!0),[x,g]=o.useState(!0);return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Notifications Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Notifications Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsx("div",{className:"space-y-5 sm:space-y-6",children:e.jsxs("div",{className:"grid grid-cols-1 gap-5 xl:grid-cols-2 xl:gap-6",children:[e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03] xl:col-span-2",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Announcement Bar"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 bg-blue-light-100 dark:bg-blue-light-500/20 rounded-lg flex items-center justify-center",children:e.jsx("svg",{className:"w-5 h-5 text-blue-light-500",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"})})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-gray-800 dark:text-white",children:"New update! Available"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Enjoy improved functionality and enhancements."})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx("button",{className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600 transition-colors",children:"Later"}),e.jsx("button",{className:"px-4 py-2 text-sm font-medium text-white bg-brand-500 rounded-lg hover:bg-brand-600 transition-colors",children:"Update Now"})]})]})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03] xl:col-span-2",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Toast Notification"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("button",{onClick:()=>t.success("Success! Action Completed!","Your action has been completed successfully."),className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-success-500 hover:bg-success-600 transition-colors",children:"Success Toast"}),e.jsx("button",{onClick:()=>t.info("Heads Up! New Information","This is an informational message."),className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-blue-light-500 hover:bg-blue-light-600 transition-colors",children:"Info Toast"}),e.jsx("button",{onClick:()=>t.warning("Alert: Double Check Required","Please review this action carefully."),className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-warning-500 hover:bg-warning-600 transition-colors",children:"Warning Toast"}),e.jsx("button",{onClick:()=>t.error("Something Went Wrong","An error occurred. Please try again."),className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-error-500 hover:bg-error-600 transition-colors",children:"Error Toast"})]}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Toast notifications appear in the top right corner with margin from top. They have a thin light gray border around the entire perimeter."})]})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Success Notification"})}),e.jsxs("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:[s&&e.jsxs("div",{className:"relative",children:[e.jsx(K,{variant:"success",title:"Success! Action Completed!",message:"Your action has been completed successfully."}),e.jsx("button",{onClick:()=>a(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),!s&&e.jsx("button",{onClick:()=>a(!0),className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-success-500 hover:bg-success-600 transition-colors",children:"Show Success Notification"})]})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Info Notification"})}),e.jsxs("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:[r&&e.jsxs("div",{className:"relative",children:[e.jsx(K,{variant:"info",title:"Heads Up! New Information",message:"This is an informational message for your attention."}),e.jsx("button",{onClick:()=>i(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),!r&&e.jsx("button",{onClick:()=>i(!0),className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-blue-light-500 hover:bg-blue-light-600 transition-colors",children:"Show Info Notification"})]})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Warning Notification"})}),e.jsxs("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:[l&&e.jsxs("div",{className:"relative",children:[e.jsx(K,{variant:"warning",title:"Alert: Double Check Required",message:"Please review this action carefully before proceeding."}),e.jsx("button",{onClick:()=>n(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),!l&&e.jsx("button",{onClick:()=>n(!0),className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-warning-500 hover:bg-warning-600 transition-colors",children:"Show Warning Notification"})]})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Error Notification"})}),e.jsxs("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:[x&&e.jsxs("div",{className:"relative",children:[e.jsx(K,{variant:"error",title:"Something Went Wrong",message:"An error occurred. Please try again or contact support."}),e.jsx("button",{onClick:()=>g(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),!x&&e.jsx("button",{onClick:()=>g(!0),className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-error-500 hover:bg-error-600 transition-colors",children:"Show Error Notification"})]})]})]})})]})}const Rr=Object.freeze(Object.defineProperty({__proto__:null,default:Ds},Symbol.toStringTag,{value:"Module"}));function Rs(){const[t,s]=o.useState(1),[a,r]=o.useState(1),[i,l]=o.useState(1);return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Pagination Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Pagination Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Pagination with Text",children:e.jsx(_e,{currentPage:t,totalPages:10,onPageChange:s,variant:"text"})}),e.jsx(u,{title:"Pagination with Text and Icon",children:e.jsx(_e,{currentPage:a,totalPages:10,onPageChange:r,variant:"text-icon"})}),e.jsx(u,{title:"Pagination with Icon",children:e.jsx(_e,{currentPage:i,totalPages:10,onPageChange:l,variant:"icon"})})]})]})}const $r=Object.freeze(Object.defineProperty({__proto__:null,default:Rs},Symbol.toStringTag,{value:"Module"}));function $s(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Popovers Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Popovers Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsx("div",{className:"space-y-5 sm:space-y-6",children:e.jsx(u,{title:"Popovers",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Popover component will be implemented here."})})})]})}const Fr=Object.freeze(Object.defineProperty({__proto__:null,default:$s},Symbol.toStringTag,{value:"Module"})),Fs=()=>e.jsx("svg",{className:"fill-current",width:"29",height:"28",viewBox:"0 0 29 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4072 8.64984C11.4072 6.77971 12.9232 5.26367 14.7934 5.26367C16.6635 5.26367 18.1795 6.77971 18.1795 8.64984C18.1795 10.52 16.6635 12.036 14.7934 12.036C12.9232 12.036 11.4072 10.52 11.4072 8.64984ZM14.7934 3.48633C11.9416 3.48633 9.62986 5.79811 9.62986 8.64984C9.62986 11.5016 11.9416 13.8133 14.7934 13.8133C17.6451 13.8133 19.9569 11.5016 19.9569 8.64984C19.9569 5.79811 17.6451 3.48633 14.7934 3.48633ZM12.8251 15.6037C8.49586 15.6037 4.98632 19.1133 4.98632 23.4425V23.847C4.98632 24.3378 5.38419 24.7357 5.87499 24.7357C6.36579 24.7357 6.76366 24.3378 6.76366 23.847V23.4425C6.76366 20.0949 9.47746 17.3811 12.8251 17.3811H16.7635C20.1111 17.3811 22.8249 20.0949 22.8249 23.4425V23.847C22.8249 24.3378 23.2228 24.7357 23.7136 24.7357C24.2044 24.7357 24.6023 24.3378 24.6023 23.847V23.4425C24.6023 19.1133 21.0927 15.6037 16.7635 15.6037H12.8251Z",fill:""})}),Os=()=>e.jsx("svg",{className:"fill-current",width:"29",height:"28",viewBox:"0 0 29 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2969 3.55469C10.8245 3.55469 9.6309 4.7483 9.6309 6.2207V7.10938H6.29462C4.82222 7.10938 3.6286 8.30299 3.6286 9.77539V20.4395C3.6286 21.9119 4.82222 23.1055 6.29462 23.1055H23.4758C24.9482 23.1055 26.1419 21.9119 26.1419 20.4395V9.77539C26.1419 8.30299 24.9482 7.10938 23.4758 7.10938H19.7025V6.2207C19.7025 4.7483 18.5089 3.55469 17.0365 3.55469H12.2969ZM18.8148 8.88672C18.8145 8.88672 18.8142 8.88672 18.8138 8.88672H10.5196C10.5193 8.88672 10.5189 8.88672 10.5186 8.88672H6.29462C5.80382 8.88672 5.40595 9.28459 5.40595 9.77539V10.9666L14.5355 14.8792C14.759 14.975 15.012 14.975 15.2356 14.8792L24.3645 10.9669V9.77539C24.3645 9.28459 23.9666 8.88672 23.4758 8.88672H18.8148ZM17.9252 7.10938V6.2207C17.9252 5.7299 17.5273 5.33203 17.0365 5.33203H12.2969C11.8061 5.33203 11.4082 5.7299 11.4082 6.2207V7.10938H17.9252ZM5.40595 20.4395V12.9003L13.8353 16.5129C14.506 16.8003 15.2651 16.8003 15.9357 16.5129L24.3645 12.9006V20.4395C24.3645 20.9303 23.9666 21.3281 23.4758 21.3281H6.29462C5.80382 21.3281 5.40595 20.9303 5.40595 20.4395Z",fill:""})}),Es=()=>e.jsx("svg",{className:"fill-current",width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.7507 1.28757C24.0978 0.940553 24.6605 0.940611 25.0075 1.28769C25.3545 1.63478 25.3544 2.19745 25.0074 2.54447L19.8787 7.67208C19.5316 8.0191 18.9689 8.01904 18.6219 7.67195C18.2749 7.32487 18.275 6.76219 18.622 6.41518L23.7507 1.28757ZM19.4452 3.1553C19.7922 2.80822 19.7921 2.24554 19.4451 1.89853C19.098 1.55151 18.5353 1.55157 18.1883 1.89866L16.4386 3.64866C16.0916 3.99574 16.0917 4.55842 16.4388 4.90543C16.7859 5.25244 17.3485 5.25238 17.6955 4.9053L19.4452 3.1553ZM13.8188 4.02442C13.6691 3.72109 13.3602 3.52905 13.0219 3.52905C12.6837 3.52905 12.3747 3.72109 12.225 4.02442L9.39921 9.75015L3.08049 10.6683C2.74574 10.717 2.46763 10.9514 2.3631 11.2731C2.25857 11.5948 2.34575 11.948 2.58797 12.1841L7.16024 16.641L6.08087 22.9342C6.02369 23.2676 6.16075 23.6045 6.43441 23.8033C6.70807 24.0022 7.07088 24.0284 7.37029 23.871L13.0219 20.8997L18.6736 23.871C18.973 24.0284 19.3358 24.0022 19.6094 23.8033C19.8831 23.6045 20.0202 23.2676 19.963 22.9342L18.8836 16.641L23.4559 12.1841C23.6981 11.948 23.7853 11.5948 23.6807 11.2731C23.5762 10.9514 23.2981 10.717 22.9634 10.6683L16.6446 9.75015L13.8188 4.02442ZM10.7862 10.9557L13.0219 6.42572L15.2576 10.9557C15.387 11.218 15.6373 11.3998 15.9267 11.4418L20.9258 12.1683L17.3084 15.6944C17.099 15.8985 17.0034 16.1927 17.0529 16.4809L17.9068 21.4599L13.4355 19.1091C13.1766 18.973 12.8673 18.973 12.6084 19.1091L8.13703 21.4599L8.99098 16.4809C9.04043 16.1927 8.94485 15.8985 8.7354 15.6944L5.118 12.1683L10.1171 11.4418C10.4066 11.3998 10.6568 11.218 10.7862 10.9557ZM25.2694 5.97276C25.6165 6.31978 25.6166 6.88245 25.2696 7.22954L23.5199 8.97954C23.1729 9.32662 22.6102 9.32668 22.2632 8.97967C21.9161 8.63265 21.916 8.06998 22.263 7.72289L24.0127 5.97289C24.3597 5.62581 24.9224 5.62575 25.2694 5.97276Z",fill:""})});function zs(){const t=[{id:1,name:"Starter",price:5,originalPrice:12,period:"/month",description:"For solo designers & freelancers",features:["5 website","500 MB Storage","Unlimited Sub-Domain","3 Custom Domain","Free SSL Certificate","Unlimited Traffic"],buttonText:"Choose Starter"},{id:2,name:"Medium",price:10.99,originalPrice:30,period:"/month",description:"For working on commercial projects",features:["10 website","1 GB Storage","Unlimited Sub-Domain","5 Custom Domain","Free SSL Certificate","Unlimited Traffic"],buttonText:"Choose Starter",highlighted:!0},{id:3,name:"Large",price:15,originalPrice:59,period:"/month",description:"For teams larger than 5 members",features:["15 website","10 GB Storage","Unlimited Sub-Domain","10 Custom Domain","Free SSL Certificate","Unlimited Traffic"],buttonText:"Choose Starter"}],s=[{id:1,name:"Personal",price:59,period:" / Lifetime",description:"For solo designers & freelancers",features:["5 website","500 MB Storage","Unlimited Sub-Domain","3 Custom Domain","!Free SSL Certificate","!Unlimited Traffic"],buttonText:"Choose Starter",icon:e.jsx(Fs,{})},{id:2,name:"Professional",price:199,period:" / Lifetime",description:"For working on commercial projects",features:["10 website","1GB Storage","Unlimited Sub-Domain","5 Custom Domain","Free SSL Certificate","!Unlimited Traffic"],buttonText:"Choose This Plan",icon:e.jsx(Os,{}),highlighted:!0},{id:3,name:"Enterprise",price:599,period:" / Lifetime",description:"For teams larger than 5 members",features:["15 website","10GB Storage","Unlimited Sub-Domain","10 Custom Domain","Free SSL Certificate","Unlimited Traffic"],buttonText:"Choose This Plan",icon:e.jsx(Es,{})}],a=[{id:1,name:"Personal",price:"Free",period:"For a Lifetime",description:"Perfect plan for Starters",features:["Unlimited Projects","Share with 5 team members","Sync across devices"],buttonText:"Current Plan",disabled:!0},{id:2,name:"Professional",price:99,period:"/year",description:"For users who want to do more",features:["Unlimited Projects","Share with 5 team members","Sync across devices","30 days version history"],buttonText:"Try for Free"},{id:3,name:"Team",price:299,period:" /year",description:"Your entire team in one place",features:["Unlimited Projects","Share with 5 team members","Sync across devices","Sharing permissions","Admin tools"],buttonText:"Try for Free",recommended:!0},{id:4,name:"Enterprise",price:"Custom",period:"Reach out for a quote",description:"Run your company on your terms",features:["Unlimited Projects","Share with 5 team members","Sync across devices","Sharing permissions","User provisioning (SCIM)","Advanced security"],buttonText:"Try for Free"}];return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Pricing Tables | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Pricing Tables page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Pricing Table 1",children:e.jsx(ve,{variant:"1",title:"Flexible Plans Tailored to Fit Your Unique Needs!",plans:t,showToggle:!0,onPlanSelect:r=>console.log("Selected plan:",r)})}),e.jsx(u,{title:"Pricing Table 2",children:e.jsx(ve,{variant:"2",plans:s,onPlanSelect:r=>console.log("Selected plan:",r)})}),e.jsx(u,{title:"Pricing Table 3",children:e.jsx(ve,{variant:"3",plans:a,onPlanSelect:r=>console.log("Selected plan:",r)})})]})]})}const Or=Object.freeze(Object.defineProperty({__proto__:null,default:zs},Symbol.toStringTag,{value:"Module"}));function Bs(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Progressbar Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Progressbar Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Progress Bar Sizes",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Small"}),e.jsx(X,{value:75,size:"sm"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Medium"}),e.jsx(X,{value:75,size:"md"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Large"}),e.jsx(X,{value:75,size:"lg"})]})]})}),e.jsx(u,{title:"Progress Bar Colors",children:e.jsxs("div",{className:"space-y-6",children:[e.jsx(X,{value:60,color:"primary",showLabel:!0}),e.jsx(X,{value:75,color:"success",showLabel:!0}),e.jsx(X,{value:45,color:"error",showLabel:!0}),e.jsx(X,{value:80,color:"warning",showLabel:!0}),e.jsx(X,{value:65,color:"info",showLabel:!0})]})}),e.jsx(u,{title:"Progress Bar with Label",children:e.jsxs("div",{className:"space-y-6",children:[e.jsx(X,{value:50,color:"primary",showLabel:!0,label:"Upload Progress"}),e.jsx(X,{value:75,color:"success",showLabel:!0,label:"Download Progress"})]})})]})]})}const Er=Object.freeze(Object.defineProperty({__proto__:null,default:Bs},Symbol.toStringTag,{value:"Module"})),fe=({children:t,text:s,variant:a="rounded",position:r="top-left",color:i="primary",className:l=""})=>{const n={primary:"bg-brand-500",success:"bg-success-500",error:"bg-error-500",warning:"bg-warning-500"},x=()=>{if(a==="rounded")return e.jsx("span",{className:`absolute -left-px mt-3 inline-block rounded-r-full ${n[i]} px-4 py-1.5 text-sm font-medium text-white`,children:s});if(a==="filled")return e.jsx("span",{className:`absolute -left-9 -top-7 mt-3 flex h-14 w-24 -rotate-45 items-end justify-center ${n[i]} px-4 py-1.5 text-sm font-medium text-white shadow-theme-xs`,children:s});const g={primary:"before:border-l-brand-500 before:border-t-brand-500 after:border-b-brand-500 after:border-l-brand-500",success:"before:border-l-success-500 before:border-t-success-500 after:border-b-success-500 after:border-l-success-500",error:"before:border-l-error-500 before:border-t-error-500 after:border-b-error-500 after:border-l-error-500",warning:"before:border-l-warning-500 before:border-t-warning-500 after:border-b-warning-500 after:border-l-warning-500"};return e.jsx("span",{className:`absolute -left-px mt-3 inline-block ${n[i]} px-4 py-1.5 text-sm font-medium text-white before:absolute before:-right-4 before:top-0 before:border-[13px] before:border-transparent before:content-[''] after:absolute after:-right-4 after:bottom-0 after:border-[13px] after:border-transparent after:content-[''] ${g[i]}`,children:s})};return e.jsxs("div",{className:`relative overflow-hidden ${l}`,children:[x(),t]})};function Gs(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Ribbons Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Ribbons Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:gap-6 lg:grid-cols-2",children:[e.jsx(u,{title:"Rounded Ribbon",children:e.jsx(fe,{text:"Popular",variant:"rounded",color:"primary",children:e.jsx("div",{className:"rounded-xl border border-gray-200 dark:border-gray-800 dark:bg-white/[0.03]",children:e.jsx("div",{className:"p-5 pt-16",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Lorem ipsum dolor sit amet consectetur. Eget nulla suscipit arcu rutrum amet vel nec fringilla vulputate. Sed aliquam fringilla vulputate imperdiet arcu natoque purus ac nec ultricies nulla ultrices."})})})})}),e.jsx(u,{title:"Filled Ribbon",children:e.jsx(fe,{text:"New",variant:"filled",color:"primary",children:e.jsx("div",{className:"rounded-xl border border-gray-200 dark:border-gray-800 dark:bg-white/[0.03]",children:e.jsx("div",{className:"p-5 pt-16",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Lorem ipsum dolor sit amet consectetur. Eget nulla suscipit arcu rutrum amet vel nec fringilla vulputate. Sed aliquam fringilla vulputate imperdiet arcu natoque purus ac nec ultricies nulla ultrices."})})})})}),e.jsx(u,{title:"Ribbon with Different Colors",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(fe,{text:"Success",variant:"rounded",color:"success",children:e.jsx("div",{className:"rounded-xl border border-gray-200 dark:border-gray-800 dark:bg-white/[0.03]",children:e.jsx("div",{className:"p-5 pt-16",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Success ribbon example."})})})}),e.jsx(fe,{text:"Warning",variant:"rounded",color:"warning",children:e.jsx("div",{className:"rounded-xl border border-gray-200 dark:border-gray-800 dark:bg-white/[0.03]",children:e.jsx("div",{className:"p-5 pt-16",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Warning ribbon example."})})})})]})})]})]})}const zr=Object.freeze(Object.defineProperty({__proto__:null,default:Gs},Symbol.toStringTag,{value:"Module"})),ne=({size:t="md",color:s="primary",className:a=""})=>{const r={sm:"h-6 w-6 border-2",md:"h-10 w-10 border-4",lg:"h-16 w-16 border-4"},i={primary:"border-gray-200 border-t-brand-500",success:"border-success-200 border-t-success-500",error:"border-error-200 border-t-error-500",warning:"border-warning-200 border-t-warning-500",info:"border-blue-light-200 border-t-blue-light-500"};return e.jsx("div",{className:`inline-flex animate-spin items-center justify-center rounded-full ${r[t]} ${i[s]} ${a}`,role:"status","aria-label":"Loading",children:e.jsx("span",{className:"sr-only",children:"Loading..."})})};function Ws(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Spinners Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Spinners Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Size Variants",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Small"}),e.jsx(ne,{size:"sm"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Medium"}),e.jsx(ne,{size:"md"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Large"}),e.jsx(ne,{size:"lg"})]})]})}),e.jsx(u,{title:"Color Variants",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Primary"}),e.jsx(ne,{color:"primary"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Success"}),e.jsx(ne,{color:"success"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Error"}),e.jsx(ne,{color:"error"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Warning"}),e.jsx(ne,{color:"warning"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:"Info"}),e.jsx(ne,{color:"info"})]})]})})]})]})}const Br=Object.freeze(Object.defineProperty({__proto__:null,default:Ws},Symbol.toStringTag,{value:"Module"})),Vs=({children:t,defaultTab:s,className:a="",onChange:r})=>{const[i,l]=o.useState(s||""),n=x=>{l(x),r&&r(x)};return e.jsx("div",{className:a,children:typeof t=="function"?t(i,n):t})},Us=({children:t,className:s=""})=>e.jsx("div",{className:`flex items-center gap-0.5 rounded-lg bg-gray-100 p-0.5 dark:bg-gray-900 ${s}`,children:t}),Pe=({children:t,tabId:s,isActive:a=!1,onClick:r,className:i=""})=>e.jsx("button",{onClick:r,className:`px-3 py-2 font-medium w-full rounded-md text-theme-sm hover:text-gray-900 dark:hover:text-white ${a?"shadow-theme-xs text-gray-900 dark:text-white bg-white dark:bg-gray-800":"text-gray-500 dark:text-gray-400"} ${i}`,type:"button",children:t}),Me=({children:t,tabId:s,isActive:a=!1,className:r=""})=>a?e.jsx("div",{className:r,children:t}):null;function Hs(){const[t,s]=o.useState("tab1");return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Tabs Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Tabs Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsx("div",{className:"space-y-5 sm:space-y-6",children:e.jsx(u,{title:"Default Tabs",children:e.jsxs(Vs,{defaultTab:"tab1",onChange:s,children:[e.jsxs(Us,{children:[e.jsx(Pe,{tabId:"tab1",isActive:t==="tab1",onClick:()=>s("tab1"),children:"Tab 1"}),e.jsx(Pe,{tabId:"tab2",isActive:t==="tab2",onClick:()=>s("tab2"),children:"Tab 2"}),e.jsx(Pe,{tabId:"tab3",isActive:t==="tab3",onClick:()=>s("tab3"),children:"Tab 3"})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx(Me,{tabId:"tab1",isActive:t==="tab1",children:e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Content for Tab 1"})}),e.jsx(Me,{tabId:"tab2",isActive:t==="tab2",children:e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Content for Tab 2"})}),e.jsx(Me,{tabId:"tab3",isActive:t==="tab3",children:e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Content for Tab 3"})})]})]})})})]})}const Gr=Object.freeze(Object.defineProperty({__proto__:null,default:Hs},Symbol.toStringTag,{value:"Module"})),je=({children:t,text:s,placement:a="top",className:r=""})=>{const i={top:"bottom-full left-1/2 mb-2 -translate-x-1/2 before:top-full before:left-1/2 before:-translate-x-1/2 before:-mt-1 before:border-t-gray-900",bottom:"top-full left-1/2 mt-2 -translate-x-1/2 before:bottom-full before:left-1/2 before:-translate-x-1/2 before:-mb-1 before:border-b-gray-900",left:"right-full top-1/2 mr-2 -translate-y-1/2 before:left-full before:top-1/2 before:-translate-y-1/2 before:-ml-1 before:border-l-gray-900",right:"left-full top-1/2 ml-2 -translate-y-1/2 before:right-full before:top-1/2 before:-translate-y-1/2 before:-mr-1 before:border-r-gray-900"};return e.jsxs("div",{className:`relative group inline-flex ${r}`,children:[t,e.jsx("span",{className:`absolute px-3 py-1.5 text-xs font-medium text-white bg-gray-900 rounded-lg opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity whitespace-nowrap before:absolute before:border-4 before:border-transparent before:content-[''] ${i[a]}`,children:s})]})};function Zs(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Tooltips Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Tooltips Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsx("div",{className:"space-y-5 sm:space-y-6",children:e.jsx(u,{title:"Tooltip Placements",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[e.jsx(je,{text:"Tooltip Top",placement:"top",children:e.jsx(f,{children:"Tooltip Top"})}),e.jsx(je,{text:"Tooltip Right",placement:"right",children:e.jsx(f,{children:"Tooltip Right"})}),e.jsx(je,{text:"Tooltip Bottom",placement:"bottom",children:e.jsx(f,{children:"Tooltip Bottom"})}),e.jsx(je,{text:"Tooltip Left",placement:"left",children:e.jsx(f,{children:"Tooltip Left"})})]})})})]})}const Wr=Object.freeze(Object.defineProperty({__proto__:null,default:Zs},Symbol.toStringTag,{value:"Module"}));function Ks(){return e.jsx("div",{className:"aspect-4/3 overflow-hidden rounded-lg",children:e.jsx("iframe",{src:"https://www.youtube.com/embed/dQw4w9WgXcQ",title:"YouTube video",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-full"})})}function qs(){return e.jsx("div",{className:"overflow-hidden rounded-lg aspect-square",children:e.jsx("iframe",{src:"https://www.youtube.com/embed/dQw4w9WgXcQ",title:"YouTube video",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-full"})})}function Ys(){return e.jsx("div",{className:"aspect-4/3 overflow-hidden rounded-lg",children:e.jsx("iframe",{src:"https://www.youtube.com/embed/dQw4w9WgXcQ",title:"YouTube video",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-full"})})}function Js(){return e.jsx("div",{className:"aspect-21/9 overflow-hidden rounded-lg",children:e.jsx("iframe",{src:"https://www.youtube.com/embed/dQw4w9WgXcQ",title:"YouTube video",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-full"})})}function Qs(){return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"React.js Videos Tabs | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Videos page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:gap-6 xl:grid-cols-2",children:[e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Video Ratio 16:9",children:e.jsx(Ys,{})}),e.jsx(u,{title:"Video Ratio 4:3",children:e.jsx(Ks,{})})]}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsx(u,{title:"Video Ratio 21:9",children:e.jsx(Js,{})}),e.jsx(u,{title:"Video Ratio 1:1",children:e.jsx(qs,{})})]})]})]})}const Vr=Object.freeze(Object.defineProperty({__proto__:null,default:Qs},Symbol.toStringTag,{value:"Module"}));export{gr as A,Nr as B,_r as C,Ir as D,dr as G,br as I,Pr as L,ur as M,Rr as N,pr as P,zr as R,xr as S,Gr as T,cr as U,Vr as V,mr as a,hr as b,fr as c,jr as d,yr as e,vr as f,wr as g,kr as h,Cr as i,Sr as j,Tr as k,Lr as l,Ar as m,Mr as n,Dr as o,$r as p,Fr as q,Or as r,Er as s,Br as t,Wr as u};