1import{r as l,j as e,U as Y,E as me,w,ai as V,B as Ls,M as Gs,x as m,T as U,cF as Ve,C as q,l as W,bB as Os,bp as Z,ct as qe,af as We,cw as Ye,W as Es,p as Hs,ap as $s,bt as Bs,bq as Ze,Z as Vs,bU as Ke,Q as qs,z as Ws,bw as Je,bF as Ys,cG as Zs,bx as Ks,cH as Js,cI as Qs,cJ as Xs,cK as et,c6 as st,bZ as tt,am as at,bV as rt,cL as lt,o as nt,cc as it,cM as ct,cN as dt,as as Qe,at as Xe,az as es,aA as ss,cO as K,aB as ot,b6 as o,b9 as mt,q as ut,u as xt,G as $,H as y,aj as B,ak as ht,bD as pt,V as Le,b5 as ie,al as gt,ab as Ge,aE as jt,br as ft,k as ce,y as Oe,ao as vt,s as Nt,t as bt,v as yt,a0 as Ee,S as wt,n as _t,K as h,bu as Ct,a$ as St}from"./index-DD-ZZ9ri.js";import{T as ts,a as as,b as G,c as de}from"./tabs-BveeFTn9.js";import{C as At,a as Dt,b as kt}from"./collapsible-DwWOBfxO.js";import{S as I,a as R,b as P,c as F,d as v,C as Tt}from"./select-7VjFXV2P.js";import{R as It,c as He,d as Rt,L as rs}from"./resizable-DcgSZrax.js";import{A as Pt,a as Ft,b as Ut,c as zt,d as Mt,e as Lt,f as Gt,g as Ot}from"./alert-dialog-v_0zUsnk.js";import{C as Et}from"./code-Aaur0Ydv.js";import{I as Ht}from"./info-C6d1iPTW.js";import{R as $e,a as k}from"./radio-group-B1hIAq-9.js";import{A as $t,a as Bt}from"./alert-Bu2-uKm8.js";import{G as ls}from"./globe-DRukMj_u.js";import{B as oe}from"./bot-BxnelbMm.js";import{L as Vt}from"./list-DUL2-00q.js";const qt={Home:Es,Check:Hs,Star:$s,Lightbulb:Bs,AlertCircle:Ze,Users:Vs,Calendar:Ke,DollarSign:qe,Settings:qs,Shield:Ws,Sparkles:Y,ArrowRight:We,CheckCircle:Je,Info:Ht,Zap:Ys,Target:Ye,Award:Zs,Bed:Ks,Bath:Js,UtensilsCrossed:Qs,Sofa:Xs,TreePine:et,Gift:st,Calculator:Ve,Wifi:tt,Camera:at,Key:rt,MapPin:lt,FileSpreadsheet:nt,Package:it,Truck:ct,Wrench:dt,CheckCircle2:Z},Wt=t=>t?qt[t]||Z:Z,ns=({content:t,pageType:n,isLoading:u})=>{const[c,g]=l.useState("preview");return u?e.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-16 h-16 border-4 border-primary/30 rounded-full animate-pulse"}),e.jsx(Y,{className:"w-8 h-8 text-primary absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 animate-spin"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-medium text-foreground",children:"Generating Content..."}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["AI is creating your ",n.replace("_"," ")]})]})]}):t?e.jsxs("div",{className:"h-full flex flex-col bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 border-b bg-muted/30",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{variant:"outline",className:"text-xs",children:n.replace("_"," ").toUpperCase()}),t.urlSlug&&e.jsxs("span",{className:"text-xs text-muted-foreground font-mono",children:["/",t.urlSlug]})]}),e.jsx(ts,{value:c,onValueChange:d=>g(d),children:e.jsxs(as,{className:"h-8",children:[e.jsxs(G,{value:"preview",className:"text-xs px-3 h-7",children:[e.jsx(me,{className:"w-3 h-3 mr-1"}),"Preview"]}),e.jsxs(G,{value:"source",className:"text-xs px-3 h-7",children:[e.jsx(Et,{className:"w-3 h-3 mr-1"}),"Source"]})]})})]}),e.jsx(V,{className:"flex-1",children:c==="preview"?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("header",{className:"border-b bg-card/50 backdrop-blur-sm sticky top-0 z-50",children:e.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ls,{size:28}),e.jsx(Gs,{className:"text-lg"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(m,{variant:"ghost",size:"sm",children:"Pricing"}),e.jsx(m,{size:"sm",children:"Get Started Free"})]})]})}),e.jsx("section",{className:"py-16 md:py-24 bg-gradient-to-b from-primary/5 to-background",children:e.jsxs("div",{className:"container mx-auto px-4 text-center",children:[t.badge&&e.jsxs(w,{variant:"secondary",className:"mb-4",children:[e.jsx(U,{className:"h-3 w-3 mr-1"}),t.badge]}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-bold font-display mb-6 tracking-tight",children:[t.title.split(" ").slice(0,2).join(" "),e.jsx("br",{}),e.jsx("span",{className:"bg-gradient-to-r from-primary to-enhanced bg-clip-text text-transparent",children:t.title.split(" ").slice(2).join(" ")||t.title})]}),t.introduction&&e.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto mb-8",children:t.introduction}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[e.jsxs(m,{size:"lg",className:"gap-2",children:[e.jsx(Ve,{className:"h-5 w-5"}),"Calculate Your Budget"]}
1),e.jsxs(m,{size:"lg",variant:"outline",className:"gap-2",children:[e.jsx(Y,{className:"h-5 w-5"}),"Get AI Estimates"]})]}),e.jsxs("div",{className:"max-w-xl mx-auto p-6 bg-card border rounded-lg",children:[e.jsx("p",{className:"text-sm font-medium mb-2",children:"ð¥ Download the PDF Checklist"}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"Get a printable version to take shopping or share with your team."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"flex-1 h-10 bg-muted rounded-md border"}),e.jsx(m,{size:"sm",children:"Get PDF"})]})]})]})}),t.quickStats&&e.jsx("section",{className:"py-8 border-b bg-card",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-3xl font-bold text-primary",children:t.quickStats.itemCount}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Essential Items"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-3xl font-bold text-enhanced",children:t.quickStats.categoryCount}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Categories"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-3xl font-bold text-premium",children:t.quickStats.budgetRange}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Typical Budget"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-3xl font-bold text-foreground",children:t.quickStats.timeline}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Timeline"})]})]})})}),e.jsx("section",{className:"py-16",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsx("div",{className:"max-w-4xl mx-auto space-y-8",children:t.sections.map((d,p)=>{const N=Wt(d.icon),C=d.number||p+1;return e.jsx(q,{className:"overflow-hidden",children:e.jsxs(W,{className:"p-0",children:[e.jsxs("div",{className:"flex items-center gap-4 p-6 bg-gradient-to-r from-primary/10 to-transparent border-b",children:[e.jsx("div",{className:"flex items-center justify-center w-12 h-12 rounded-full bg-primary text-primary-foreground font-bold text-xl",children:C}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("h2",{className:"text-xl font-bold flex items-center gap-2",children:[e.jsx(N,{className:"h-5 w-5 text-primary"}),d.heading]}),d.description&&e.jsx("p",{className:"text-sm text-muted-foreground",children:d.description})]})]}),e.jsxs("div",{className:"p-6",children:[d.content&&e.jsx("div",{className:"prose dark:prose-invert max-w-none mb-4",children:e.jsx(Os,{children:d.content})}),d.items&&d.items.length>0&&e.jsx("ul",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mb-4",children:d.items.map((j,S)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx(Z,{className:"h-4 w-4 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:j})]},S))}),d.tip&&e.jsxs("div",{className:"flex items-start gap-2 p-3 bg-primary/5 rounded-lg border border-primary/20",children:[e.jsx(qe,{className:"h-4 w-4 text-primary flex-shrink-0 mt-0.5"}),e.jsxs("p",{className:"text-sm",children:[e.jsx("span",{className:"font-semibold",children:"Pro Tip:"})," ",d.tip]})]})]})]})},p)})})})}),t.faqItems&&t.faqItems.length>0&&e.jsx("section",{className:"py-12 bg-muted/30",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-center",children:"Frequently Asked Questions"}),e.jsx("div",{className:"space-y-4",children:t.faqItems.map((d,p)=>e.jsx(q,{children:e.jsxs(W,{className:"p-4",children:[e.jsx("h3",{className:"font-semibold mb-2",children:d.question}),e.jsx("p",{className:"text-sm text-muted-foreground",children:d.answer})]})},p))})]})})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-primary/10 via-enhanced/10 to-premium/10",children:e.jsxs("div",{className:"container mx-auto px-4 text-center",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold font-display mb-4",children:"Stop Guessing Your Setup Costs"}),t.conclusion&&e.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto mb-8",children:t.conclusion}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[e.jsxs(m,{size:"lg",className:"gap-2",children:[t.callToAction||"Start Free Trial",e.jsx(We,{className:"h-5 w-5"})]}),e.jsx(m,{size:"lg",variant:"outline",children:"View Pricing"})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"30-day free trial ⢠No credit card required ⢠50 AI credits included"})]})}),t.relatedPageSuggestion&&e.jsx("section",{className:"py-8 border-t",children:e.jsx("div",{className:"container mx-auto px-4 text-center",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Related: ",e.jsx("span",{className:"text-primary font-medium",children:t.relatedPageSuggestion})]})})}),e.jsx("footer",{className:"py-8 border-t bg-card",children:e.jsxs("div",{className:"container mx-auto px-4 text-center text-sm text-muted-foreground",children:[e.jsx("p",{children:"© 2025 TurnkeyHome.AI. All rights reserved."}
1),e.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1",children:"Owned and operated by Big Toy Stays LLC."})]})}),(t.metaTitle||t.metaDescription)&&e.jsx("div",{className:"fixed bottom-4 right-4 max-w-sm",children:e.jsx(q,{className:"border-dashed border-blue-300 bg-blue-50/95 dark:bg-blue-950/95 shadow-lg",children:e.jsxs(W,{className:"p-3 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-blue-600 dark:text-blue-400 font-medium",children:[e.jsx(Ye,{className:"w-3 h-3"}),"SEO Preview"]}),e.jsx("p",{className:"text-blue-800 dark:text-blue-200 font-medium text-sm",children:t.metaTitle||t.title}),e.jsxs("p",{className:"text-xs text-green-600 dark:text-green-400 font-mono",children:["turnkeyhome.ai/",t.urlSlug||"page"]}),e.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:t.metaDescription})]})})})]}):e.jsx("div",{className:"p-4",children:e.jsx("pre",{className:"text-xs font-mono bg-slate-900 text-slate-100 p-4 rounded-lg overflow-x-auto",children:JSON.stringify(t,null,2)})})})]}):e.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8 text-center",children:[e.jsx("div",{className:"w-24 h-24 rounded-full bg-muted/50 flex items-center justify-center",children:e.jsx(me,{className:"w-12 h-12 text-muted-foreground/50"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-lg font-medium text-foreground",children:"Preview Area"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:'Configure your agent and click "Test Run" to see the generated content here'})]})]})},Yt=({open:t,onOpenChange:n,content:u,pageType:c="blog_post",title:g})=>e.jsx(Qe,{open:t,onOpenChange:n,children:e.jsxs(Xe,{className:"max-w-5xl h-[90vh] p-0 flex flex-col",children:[e.jsx(es,{className:"px-6 py-4 border-b shrink-0",children:e.jsx(ss,{children:g||(u==null?void 0:u.title)||"Content Preview"})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx(ns,{content:u,pageType:c,isLoading:!1})})]})}),Zt=[{value:"0",label:"Sunday"},{value:"1",label:"Monday"},{value:"2",label:"Tuesday"},{value:"3",label:"Wednesday"},{value:"4",label:"Thursday"},{value:"5",label:"Friday"},{value:"6",label:"Saturday"}],Kt=Array.from({length:28},(t,n)=>({value:String(n+1),label:`${n+1}${Qt(n+1)}`})),Jt=Array.from({length:24},(t,n)=>({value:String(n),label:Xt(n)}));function Qt(t){if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function Xt(t){const n=t>=12?"PM":"AM";return`${t===0?12:t>12?t-12:t}:00 ${n}`}function ea(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"America/New_York"}}function sa(){try{const t={timeZoneName:"short"},c=new Intl.DateTimeFormat("en-US",t).formatToParts(new Date).find(g=>g.type==="timeZoneName");return(c==null?void 0:c.value)||""}catch{return""}}const ta=({open:t,onOpenChange:n,agentName:u,scheduleType:c,onScheduleTypeChange:g,firstRunDay:d,onFirstRunDayChange:p,scheduledHour:N,onScheduledHourChange:C,destinationDomain:j,onDestinationDomainChange:S,destinationPath:b,onDestinationPathChange:A,publishMode:_,onPublishModeChange:z,onActivate:M,isActivating:T})=>{const J=l.useMemo(()=>ea(),[]),O=l.useMemo(()=>sa(),[]);return e.jsx(Qe,{open:t,onOpenChange:n,children:e.jsxs(Xe,{className:"sm:max-w-[500px]",children:[e.jsxs(es,{children:[e.jsxs(ss,{className:"flex items-center gap-2",children:[e.jsx(K,{className:"w-5 h-5 text-primary"}),"Activate Agent"]}),e.jsxs(ot,{children:['Configure when and where "',u,'" should publish content.']})]}),e.jsxs("div",{className:"space-y-6 py-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(Ke,{className:"w-4 h-4 text-muted-foreground"}),"Run Frequency"]}),e.jsx($e,{value:c,onValueChange:g,children:e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"flex items-center space-x-2 border rounded-lg p-3 hover:bg-muted/50 cursor-pointer",children:[e.jsx(k,{value:"once",id:"once"}),e.jsx(o,{htmlFor:"once",className:"cursor-pointer font-normal",children:"Once (Manual)"})]}),e.jsxs("div",{className:"flex items-center space-x-2 border rounded-lg p-3 hover:bg-muted/50 cursor-pointer",children:[e.jsx(k,{value:"daily",id:"daily"}),e.jsx(o,{htmlFor:"daily",className:"cursor-pointer font-normal",children:"Daily"})]}),e.jsxs("div",{className:"flex items-center space-x-2 border rounded-lg p-3 hover:bg-muted/50 cursor-pointer",children:[e.jsx(k,{value:"weekly",id:"weekly"}),e.jsx(o,{htmlFor:"weekly",className:"cursor-pointer font-normal",children:"Weekly"})]}),e.jsxs("div",{className:"flex items-center space-x-2 border rounded-lg p-3 hover:bg-muted/50 cursor-pointer",children:[e.jsx(k,{value:"biweekly",id:"biweekly"}),e.jsx(o,{htmlFor:"biweekly",className:"cursor-pointer font-normal",children:"Bi-weekly"})]}),e.jsxs("div",{className:"flex items-center space-x-2 border rounded-lg p-3 hover:bg-muted/50 cursor-pointer col-span-2",children:[e.jsx(k,{value:"monthly",id:"monthly"}),e.jsx(o,{htmlFor:"monthly",className:"cursor-pointer font-normal",children:"Monthly"})]})]})})]}),c!=="once"&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(U,{className:"w-4 h-4 text-muted-foreground"}),"Schedule Time"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(o,{className:"text-xs text-muted-foreground",children:["Time (",O,")"]}),e.jsxs(I,{value:String(N),onValueChange:x=>C(parseInt(x)),children:[e.jsx(R,{children:e.jsx(P,{placeholder:"Select time"})}),e.jsx(F,{children:Jt.map(x=>e.jsx(v,{value:x.value,children:x.label},x.value))})]})]}),c!=="daily"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{className:"text-xs text-muted-foreground",children:c==="monthly"?"Day of Month":"Day of Week"}),c==="monthly"?e.jsxs(I,{value:d,onValueChange:p,children:[e.jsx(R,{children:e.jsx(P,{placeholder:"Select day"})}),e.jsx(F,{children:Kt.map(x=>e.jsx(v,{value:x.value,children:x.label},x.value))})]}):e.jsxs(I,{value:d,onValueChange:p,children:[e.jsx(R,{children:e.jsx(P,{placeholder:"Select day"})}),e.jsx(F,{children:Zt.map(x=>e.jsx(v,{value:x.value,children:x.label},x.value))})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Your timezone: ",J]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(ls,{className:"w-4 h-4 text-muted-foreground"}),"Destination"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{className:"text-xs text-muted-foreground",children:"Domain"}),e.jsxs(I,{value:j,onValueChange:S,children:[e.jsx(R,{children:e.jsx(P,{placeholder:"Select domain"})}),e.jsxs(F,{children:[e.jsx(v,{value:"turnkeyhome.ai",children:"turnkeyhome.ai"}),e.jsx(v,{value:"coststr.com",children:"coststr.com"}),e.jsx(v,{value:"planstr.com",children:"planstr.com"}),e.jsx(v,{value:"furnishstr.com",children:"furnishstr.com"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{className:"text-xs text-muted-foreground",children:"Path"}),e.jsxs(I,{value:b,onValueChange:A,children:[e.jsx(R,{children:e.jsx(P,{placeholder:"Select path"})}),e.jsxs(F,{children:[e.jsx(v,{value:"/blog",children:"/blog"}),e.jsx(v,{value:"/diy-checklist",children:"/diy-checklist"}),e.jsx(v,{value:"/resources",children:"/resources"}),e.jsx(v,{value:"/guides",children:"/guides"})]})]})]})]}),j&&b&&e.jsxs("p",{className:"text-sm text-muted-foreground font-mono",children:["Preview: ",j,b,"/[slug]"]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(o,{children:"Publish Mode"}),e.jsx($e,{value:_,onValueChange:z,children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-start space-x-3 border rounded-lg p-3 hover:bg-muted/50 cursor-pointer",children:[e.jsx(k,{value:"draft",id:"draft",className:"mt-1"}),e.jsxs("div",{children:[e.jsx(o,{htmlFor:"draft",className:"cursor-pointer font-medium",children:"Draft (Requires Approval)"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Content will be saved for your review before publishing"})]})]}),e.jsxs("div",{className:"flex items-start space-x-3 border rounded-lg p-3 hover:bg-muted/50 cursor-pointer",children:[e.jsx(k,{value:"auto_publish",id:"auto_publish",className:"mt-1"}),e.jsxs("div",{children:[e.jsx(o,{htmlFor:"auto_publish",className:"cursor-pointer font-medium",children:"Auto-publish"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Content will go live automatically when generated"})]})]})]})})]}),_==="auto_publish"&&e.jsxs($t,{variant:"default",className:"border-amber-200 bg-amber-50 dark:bg-amber-950/30",children:[e.jsx(Ze,{className:"h-4 w-4 text-amber-600"}),e.jsx(Bt,{className:"text-amber-700 dark:text-amber-300",children:"Auto-publish will make content live without review. Use carefully."})]})]}),e.jsxs(mt,{children:[e.jsx(m,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),e.jsx(m,{onClick:M,disabled:T||!j||!b,className:"bg-gradient-to-r from-primary to-enhanced",children:T?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin mr-2"}),"Activating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(K,{className:"w-4 h-4 mr-2"}),"Activate Agent"]})})]})]})})},aa=t=>{const n=t>=12?"PM":"AM";return`${t===0?12:t>12?t-12:t}:00 ${n}`},ra=(t,n,u)=>{const c=new Date(t),g=c.toLocaleDateString("en-US",{weekday:"short"}),d=c.toLocaleDateString("en-US",{month:"short",day:"numeric"}),p=u!=null?aa(u):c.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});return n==="monthly"?`${d} at ${p}`:`${g}, ${d} at ${p}`},la=(t,n)=>{const u=n.filter(c=>c.agent_id===t);return{total:u.length,published:u.filter(c=>c.status==="published").length,draft:u.filter(c=>c.status==="draft").length}},Be=[{value:"short_term_rental",label:"Short Term Rental / Airbnb / VRBO"},{value:"home_improvement",label:"Home Improvement / DIY"},{value:"renovation",label:"Renovation"},{value:"investment",label:"Investment Property"},{value:"new_home",label:"New Home Setup"},{value:"architect",label:"Architects"},{value:"interior_designer",label:"Interior Designers"}],na=[{value:"google_search",label:"Web Search (Grounding)",icon:ls},{value:"specific_urls",label:"Specific URLs",icon:rs},{value:"uploaded_docs",label:"Uploaded Documents",icon:St}];function ba(){const t=ut();xt();const[n,u]=l.useState(""),[c,g]=l.useState(""),[d,p]=l.useState("short_term_rental"),[N,C]=l.useState(""),[j,S]=l.useState([]),[b,A]=l.useState([""]),[_,z]=l.useState([]),[M,T]=l.useState(!0),[J,O]=l.useState("builder"),[x,Q]=l.useState(null),[X,ue]=l.useState(!1),[is,ee]=l.useState(!1),[se,xe]=l.useState("once"),[cs,ds]=l.useState("1"),[he,pe]=l.useState(9),[te,ge]=l.useState("turnkeyhome.ai"),[ae,je]=l.useState("/blog"),[re,fe]=l.useState("draft"),[os,ve]=l.useState(!1),ms=$(y.content.listAgents),us=$(y.content.listGeneratedContent,{limit:50}),xs=$(y.content.listLogs,{limit:100}),Ne=($(y.resources.listDocuments)||[]).map(s=>({id:s.id,title:s.title,resource_type:s.resource_type,description:s.description,created_at:s.created_at||""})),be=B(y.content.saveAgent),hs=B(y.content.deleteAgent),ps=B(y.content.publishContent);B(y.content.deleteContent);const[D,ye]=l.useState(null),[gs,we]=l.useState(!1),[js,fs]=l.useState(null),[vs,le]=l.useState(!1),[_e,Ce]=l.useState(null),[Se,Ae]=l.useState(!1),[Ns,De]=l.useState(!1),[bs,ys]=l.useState(null),[ke,Te]=l.useState(null),[Ie,Re]=l.useState(null),E=(ms||[]).map(s=>({id:s._id,name:s.name,description:s.description||null,page_type:s.pageType,audience_category:s.audienceCategory,system_prompt:s.systemPrompt,data_sources:s.dataSources,specific_urls:s.specificUrls,document_references:s.documentReferences,seo_auto_generate:s.seoAutoGenerate,schedule_type:s.scheduleType,scheduled_hour:s.scheduledHour||null,scheduled_minute:s.scheduledMinute||null,scheduled_timezone:s.scheduledTimezone||null,destination_domain:s.destinationDomain||null,destination_path:s.destinationPath||null,publish_mode:s.publishMode,status:s.status,last_run_at:s.lastRunAt||null,next_run_at:s.nextRunAt||null,created_at:new Date(s.createdAt).toISOString()})),Pe=(us||[]).map(s=>({id:s._id,agent_id:s.agentId||"",content_json:s.contentJson,status:s.status,published_url:s.publishedUrl||null,created_at:new Date(s.createdAt).toISOString(),generation_time_ms:s.generationTimeMs||null})),Fe=(xs||[]).map(s=>({id:s._id,agent_id:s.agentId,run_type:s.runType,status:s.status,error_message:s.errorMessage||null,duration_ms:s.durationMs||null,created_at:new Date(s.createdAt).toISOString()})),Ue=ht(y.ai.generateContentNode),ws=async(s="manual_test")=>{var r;if(!N.trim()){h.error("Please enter a system prompt");return}ue(!0),Q(null);try{const a=await Ue({agentId:D||void 0,name:n,pageType:"resource_guide",audienceCategory:d,systemPrompt:N,dataSources:j,specificUrls:b.filter(f=>f.trim()),documentReferences:_,seoAutoGenerate:M,runType:s});if(!a.success)throw new Error(a.error||"Generation failed");a.content&&(Q(a.content),h.success(`Generated in ${((r=a.metadata)!=null&&r.duration?a.metadata.duration/1e3:0).toFixed(1)}s`))}catch(a){console.error("Test run error:",a),h.error(a instanceof Error?a.message:"Failed to generate content")}finally{ue(!1)}},_s=async s=>{var r;Te(s.id);try{const a=await Ue({agentId:s.id,name:s.name,pageType:s.page_type,audienceCategory:s.audience_category,systemPrompt:s.system_prompt,dataSources:s.data_sources,specificUrls:s.specific_urls,documentReferences:s.document_references,seoAutoGenerate:s.seo_auto_generate,runType:"manual_generate"});if(!a.success)throw new Error(a.error||"Generation failed");h.success(`Content generated in ${((r=a.metadata)!=null&&r.duration?a.metadata.duration/1e3:0).toFixed(1)}s`)}catch(a){console.error("Run agent error:",a),h.error(a instanceof Error?a.message:"Failed to run agent")}finally{Te(null)}},ze=async()=>
1{if(!n.trim()||!N.trim()){h.error("Please enter agent name and system prompt");return}we(!0);try{const s={agentId:D,name:n,description:c||void 0,pageType:"resource_guide",audienceCategory:d,systemPrompt:N,dataSources:j,specificUrls:b.filter(r=>r.trim()),documentReferences:_,seoAutoGenerate:M,scheduleType:se,destinationDomain:te||void 0,destinationPath:ae||void 0,publishMode:re};await be(s),h.success(D?"Agent updated":"Agent saved"),Me()}catch(s){console.error("Save error:",s),h.error("Failed to save agent")}finally{we(!1)}},Cs=async()=>{if(_e){Ae(!0);try{await hs({agentId:_e}),h.success("Agent deleted"),le(!1),Ce(null)}catch(s){console.error("Delete error:",s),h.error("Failed to delete agent")}finally{Ae(!1)}}},Ss=async()=>{D||await ze(),ve(!0);try{const s=Intl.DateTimeFormat().resolvedOptions().timeZone;await be({agentId:D,status:"active",scheduleType:se,scheduledHour:he,scheduledMinute:0,scheduledTimezone:s,destinationDomain:te,destinationPath:ae,publishMode:re,audienceCategory:"general",dataSources:[],documentReferences:[],name:"Agent",pageType:"article",specificUrls:[],systemPrompt:"",seoAutoGenerate:!0}),h.success("Agent activated!"),ee(!1)}catch(s){console.error("Activate error:",s),h.error("Failed to activate agent")}finally{ve(!1)}},As=s=>{var r;ye(s.id),u(s.name),g(s.description||""),p(s.audience_category||"short_term_rental"),C(s.system_prompt),S(s.data_sources||[]),A((r=s.specific_urls)!=null&&r.length?s.specific_urls:[""]),z(s.document_references||[]),T(s.seo_auto_generate),xe(s.schedule_type),pe(s.scheduled_hour??9),ge(s.destination_domain||"turnkeyhome.ai"),je(s.destination_path||"/blog"),fe(s.publish_mode),O("builder")},Ds=s=>{ys(s.content_json),De(!0)},ks=async s=>{var r,a,f,L;Re(s.id);try{const i=E.find(Ms=>Ms.id===s.agent_id),H=(i==null?void 0:i.destination_domain)||"turnkeyhome.ai",Us=(i==null?void 0:i.destination_path)||"/diy-checklist",zs=((a=(r=s.content_json)==null?void 0:r.seoMetadata)==null?void 0:a.urlSlug)||((L=(f=s.content_json)==null?void 0:f.title)==null?void 0:L.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""))||s.id.slice(0,8),ne=`https://${H}${Us}/${zs}`;await ps({contentId:s.id,publishedUrl:ne}),h.success("Content published!",{description:`Published to ${ne}`,action:{label:"Copy URL",onClick:()=>{navigator.clipboard.writeText(ne),h.success("URL copied to clipboard")}}})}catch(i){console.error("Publish error:",i),h.error("Failed to publish content")}finally{Re(null)}},Me=()=>{ye(null),u(""),g(""),p("short_term_rental"),C(""),S([]),A([""]),z([]),T(!0),Q(null)},Ts=s=>{S(r=>r.includes(s)?r.filter(a=>a!==s):[...r,s])},Is=s=>{z(r=>r.includes(s)?r.filter(a=>a!==s):[...r,s])},Rs=()=>{A(s=>[...s,""])},Ps=(s,r)=>{A(a=>{const f=[...a];return f[s]=r,f})},Fs=s=>{A(r=>r.filter((a,f)=>f!==s))};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("div",{className:"border-b bg-card",children:e.jsxs("div",{className:"flex items-center justify-between px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(m,{variant:"ghost",size:"icon",onClick:()=>t("/dashboard"),children:e.jsx(pt,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-primary to-enhanced flex items-center justify-center",children:e.jsx(oe,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold",children:"Agent Studio"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Create & manage AI content agents"})]})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(m,{variant:"outline",onClick:Me,children:[e.jsx(Le,{className:"w-4 h-4 mr-2"}),"New Agent"]})})]})}),e.jsxs(ts,{value:J,onValueChange:O,className:"h-[calc(100vh-73px)]",children:[e.jsx("div",{className:"border-b px-6",children:e.jsxs(as,{className:"h-12",children:[e.jsxs(G,{value:"builder",className:"gap-2",children:[e.jsx(Y,{className:"w-4 h-4"}),"Agent Builder"]}),e.jsxs(G,{value:"agents",className:"gap-2",children:[e.jsx(oe,{className:"w-4 h-4"}),"My Agents (",E.length,")"]}),e.jsxs(G,{value:"logs",className:"gap-2",children:[e.jsx(U,{className:"w-4 h-4"}),"Run Logs"]})]})}),e.jsx(de,{value:"builder",className:"h-full m-0",children:e.jsxs(It,{direction:"horizontal",className:"h-full",children:[e.jsx(He,{defaultSize:40,minSize:30,children:e.jsx(V,{className:"h-full",children:e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{children:"Agent Name"}),e.jsx(ie,{value:n,onChange:s=>u(s.target.value),placeholder:"e.g., Airbnb Trend Reporter"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{children:"Description (optional)"}),e.jsx(ie,{value:c,onChange:s=>g(s.target.value),placeholder:"What does this agent do?"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{children:"Target Audience"}),e.jsxs(I,{value:d,onValueChange:p,children:[e.jsx(R,{children:e.jsx(P,{})}),e.jsx(F,{children:Be.map(s=>e.jsx(v,{value:s.value,children:s.label},s.value))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Content will be tailored for this audie
1nce (terminology, tone, examples)"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{children:"System Prompt / Instructions"}),e.jsx(gt,{value:N,onChange:s=>C(s.target.value),placeholder:`Write detailed instructions for the AI agent... 2 3Example: Research the top 5 Airbnb coaches on YouTube and write a summary blog post about their best tips for new hosts. Include specific actionable advice and quote sources.`,className:"min-h-[200px] font-mono text-sm"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[N.length," characters"]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(o,{children:"Data Sources"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:na.map(s=>e.jsxs(w,{variant:j.includes(s.value)?"default":"outline",className:"cursor-pointer hover:bg-primary/80 transition-colors",onClick:()=>Ts(s.value),children:[e.jsx(s.icon,{className:"w-3 h-3 mr-1"}),s.label]},s.value))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Web Search uses Gemini's built-in search grounding for real-time data"})]}),j.includes("specific_urls")&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(o,{children:"Reference URLs"}),b.map((s,r)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ie,{value:s,onChange:a=>Ps(r,a.target.value),placeholder:"https://example.com/article"}),b.length>1&&e.jsx(m,{variant:"ghost",size:"icon",onClick:()=>Fs(r),children:e.jsx(Ge,{className:"w-4 h-4"})})]},r)),e.jsxs(m,{variant:"outline",size:"sm",onClick:Rs,children:[e.jsx(Le,{className:"w-4 h-4 mr-1"}),"Add URL"]})]}),j.includes("uploaded_docs")&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(o,{children:"Select Documents"}),e.jsx("div",{className:"border rounded-lg max-h-48 overflow-auto",children:Ne.length===0?e.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No documents available. Upload documents in the admin resources section."}):e.jsx("div",{className:"divide-y",children:Ne.map(s=>e.jsxs("label",{className:"flex items-center gap-3 p-3 hover:bg-muted/50 cursor-pointer",children:[e.jsx(jt,{checked:_.includes(s.id),onCheckedChange:()=>Is(s.id)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.resource_type," ⢠",new Date(s.created_at).toLocaleDateString()]})]})]},s.id))})}),_.length>0&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[_.length," document(s) selected"]})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx(o,{children:"Auto-generate SEO Metadata"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Title, description, and URL slug"})]}),e.jsx(ft,{checked:M,onCheckedChange:T})]}),e.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[e.jsx(m,{onClick:()=>ws("manual_test"),disabled:X||!N.trim(),className:"flex-1",children:X?e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-4 h-4 mr-2 animate-spin"}),"Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Oe,{className:"w-4 h-4 mr-2"}),"Test Run"]})}),e.jsxs(m,{variant:"outline",onClick:ze,disabled:gs||!n.trim(),children:[e.jsx(vt,{className:"w-4 h-4 mr-2"}),D?"Update":"Save"]}),(D||x)&&e.jsxs(m,{variant:"default",onClick:()=>ee(!0),className:"bg-gradient-to-r from-primary to-enhanced",children:[e.jsx(K,{className:"w-4 h-4 mr-2"}),"Activate"]})]})]})})}),e.jsx(Rt,{withHandle:!0}),e.jsx(He,{defaultSize:60,minSize:40,children:e.jsx("div",{className:"h-full border-l bg-muted/30",children:e.jsx(ns,{content:x,pageType:"resource_guide",isLoading:X})})})]})}),e.jsx(de,{value:"agents",className:"h-full m-0 p-6",children:e.jsx(V,{className:"h-full",children:e.jsxs("div",{className:"space-y-4",children:[E.map(s=>{var L;const r=la(s.id,Pe),a=Pe.filter(i=>i.agent_id===s.id),f=js===s.id;return e.jsxs(q,{className:"hover:shadow-lg transition-shadow",children:[e.jsx(Nt,{className:"pb-3",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(bt,{className:"text-lg",children:s.name}),e.jsx(w,{variant:s.status==="active"?"default":"secondary",children:s.status})]}),e.jsx(yt,{className:"line-clamp-2",children:s.description||"No description"})]}),r.total>0&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(Ee,{className:"w-3.5 h-3.5"}),e.jsxs("span",{children:[r.total," content"]}),r.published>0&&e.jsxs(w,{variant:"default",className:"text-[10px] px-1.5 py-0",children:[r.published," published"]})]})]})}),e.jsxs(W,{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(Vt,{className:"w-4 h-4"}),e.jsx("span",{children:"Resource Guide"})]}),e.jsx(w,{variant:"outline",className:"text-xs",children:((L=Be.find(i=>i.value===s.audience_category))==null?void 0:L.label)||"STR"})]}),s.status==="active"&&s.schedule_type&&e.jsxs("div",{className:"bg-muted/50 rounded-lg p-2.5 space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx(U,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"font-medium",children:s.schedule_type==="once"?"Manual":s.schedule_type==="daily"?"Daily":s.schedule_type==="weekly"?"Weekly":s.schedule_type==="biweekly"?"Bi-weekly":s.schedule_type==="monthly"?"Monthly":s.schedule_type}),e.jsx(w,{variant:s.publish_mode==="auto_publish"?"default":"secondary",className:"text-[10px] px-1.5 py-0",children:s.publish_mode==="auto_publish"?"Auto-publish":"Draft"})]}),s.next_run_at&&s.schedule_type!=="once"&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs pl-5",children:[e.jsx("span",{className:"text-muted-foreground",children:"Next:"}),e.jsx("span",{className:"font-medium text-primary",children:ra(s.next_run_at,s.schedule_type,s.scheduled_hour)})]}),s.last_run_at&&e.jsxs("p",{className:"text-[10px] text-muted-foreground pl-5",children:["Last: ",new Date(s.last_run_at).toLocaleDateString()]}),s.destination_domain&&s.destination_path&&e.jsxs("p",{className:"text-[10px] text-muted-foreground font-mono pl-5",children:["â ",s.destination_domain,s.destination_path]})]}),e.jsxs("div",{className:"flex gap-2 pt-2",children:[e.jsxs(m,{variant:"outline",size:"sm",onClick:()=>As(s),children:[e.jsx(wt,{className:"w-3 h-3 mr-1"}),"Edit"]}),e.jsxs(m,{variant:"outline",size:"sm",onClick:()=>_s(s),disabled:ke===s.id,children:[ke===s.id?e.jsx(ce,{className:"w-3 h-3 mr-1 animate-spin"}):e.jsx(Oe,{className:"w-3 h-3 mr-1"}),"Run Now"]}),e.jsx(m,{variant:"ghost",size:"sm",onClick:()=>{Ce(s.id),le(!0)},className:"text-destructive hover:text-destructive",children:e.jsx(Ge,{className:"w-3 h-3"})})]}),a.length>0&&e.jsxs(At,{open:f,onOpenChange:i=>fs(i?s.id:null),className:"border-t pt-3 mt-3",children:[e.jsx(Dt,{asChild:!0,children:e.jsxs(m,{variant:"ghost",size:"sm",className:"w-full justify-between hover:bg-muted/50",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"View Content (",a.length,")"]}),f?e.jsx(Tt,{className:"w-4 h-4"}):e.jsx(_t,{className:"w-4 h-4"})]})}),e.jsx(kt,{className:"pt-3 space-y-2",children:a.map(i=>{var H;return e.jsxs("div",{className:"p-3 rounded-lg border bg-background hover:bg-muted/30 transition-colors",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium text-sm truncate",children:((H=i.content_json)==null?void 0:H.title)||"Untitled"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[new Date(i.created_at).toLocaleStr
3ing(),i.generation_time_ms&&` ⢠${(i.generation_time_ms/1e3).toFixed(1)}s`]})]}),e.jsx(w,{variant:i.status==="published"?"default":i.status==="draft"?"secondary":"outline",className:"text-[10px] shrink-0",children:i.status})]}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsxs(m,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>Ds(i),children:[e.jsx(me,{className:"w-3 h-3 mr-1"}),"Preview"]}),i.status!=="published"&&e.jsxs(m,{size:"sm",className:"h-7 text-xs bg-gradient-to-r from-primary to-enhanced",onClick:()=>ks(i),disabled:Ie===i.id,children:[Ie===i.id?e.jsx(ce,{className:"w-3 h-3 mr-1 animate-spin"}):e.jsx(K,{className:"w-3 h-3 mr-1"}),"Publish"]}),i.status==="published"&&i.published_url&&e.jsxs(m,{variant:"secondary",size:"sm",className:"h-7 text-xs",onClick:()=>{navigator.clipboard.writeText(i.published_url),h.success("URL copied")},children:[e.jsx(rs,{className:"w-3 h-3 mr-1"}),"Copy URL"]})]})]},i.id)})})]})]})]},s.id)}),E.length===0&&e.jsxs("div",{className:"text-center py-12",children:[e.jsx(oe,{className:"w-12 h-12 mx-auto text-muted-foreground/50 mb-4"}),e.jsx("p",{className:"text-lg font-medium",children:"No agents yet"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Create your first agent in the Builder tab"})]})]})})}),e.jsx(de,{value:"logs",className:"h-full m-0 p-6",children:e.jsx(V,{className:"h-full",children:e.jsxs("div",{className:"space-y-2",children:[Fe.map(s=>e.jsxs("div",{className:"flex items-center gap-4 p-3 border rounded-lg hover:bg-muted/50",children:[s.status==="success"?e.jsx(Je,{className:"w-5 h-5 text-green-500"}):s.status==="failed"?e.jsx(Ct,{className:"w-5 h-5 text-red-500"}):e.jsx(U,{className:"w-5 h-5 text-amber-500 animate-pulse"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{variant:"outline",className:"text-xs",children:s.run_type.replace("_"," ")}),s.duration_ms&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:[(s.duration_ms/1e3).toFixed(1),"s"]})]}),s.error_message&&e.jsx("p",{className:"text-sm text-red-500 mt-1",children:s.error_message})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(s.created_at).toLocaleString()})]},s.id)),Fe.length===0&&e.jsxs("div",{className:"text-center py-12",children:[e.jsx(U,{className:"w-12 h-12 mx-auto text-muted-foreground/50 mb-4"}),e.jsx("p",{className:"text-lg font-medium",children:"No logs yet"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Run an agent to see logs here"})]})]})})})]}),e.jsx(ta,{open:is,onOpenChange:ee,agentName:n,scheduleType:se,onScheduleTypeChange:xe,firstRunDay:cs,onFirstRunDayChange:ds,scheduledHour:he,onScheduledHourChange:pe,destinationDomain:te,onDestinationDomainChange:ge,destinationPath:ae,onDestinationPathChange:je,publishMode:re,onPublishModeChange:fe,onActivate:Ss,isActivating:os}),e.jsx(Pt,{open:vs,onOpenChange:le,children:e.jsxs(Ft,{children:[e.jsxs(Ut,{children:[e.jsx(zt,{children:"Delete Agent?"}),e.jsx(Mt,{children:"This will permanently delete this agent and cannot be undone. Generated content will not be affected."})]}),e.jsxs(Lt,{children:[e.jsx(Gt,{children:"Cancel"}),e.jsx(Ot,{onClick:Cs,disabled:Se,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Se?"Deleting...":"Delete"})]})]})}),e.jsx(Yt,{open:Ns,onOpenChange:De,content:bs})]})}export{ba as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.