1import{r as D,j as e}from"./ui-CPW3-RCR.js";import{a0 as Se,aE as Ke,aR as Fe,br as Pt,ce as Dt,bm as It,ct as Lt,a9 as Rt,G as Oe,aP as Ot,aL as zt,b4 as Vt,Y as Et,ap as He,g as ve,l as ns,aZ as Ys,m as cs,n as os,o as ds,I as m,c as Ye,B as _,L as es,s as ee,d as V,bC as ss,ak as de,al as xe,f as Le,bB as Mt,am as he,Z as pe,cr as At,D as $t,U as Be,cB as xs,a2 as Me,ae as ts,e as hs,bK as Je,y as We,J as qe,aa as g,T as te,a_ as ms,a$ as us,b0 as me,b1 as ue,bc as be,bO as ze,N as U,P as se,cY as Js,a5 as Ve,d3 as Qs,af as ps,ag as js,ah as gs,aQ as Gt,X as zs,bI as Ft,cs as Qe,bb as Vs,b2 as Es,aq as Ht,ao as vs,_ as Ms,ac as Bt,$ as Wt,a as qt,z as Zt,E as Xt}from"./index-BraPXa8T.js";import{u as Kt,a as Yt,C as Jt,b as bs,S as Qt,v as Ut,c as ea,d as As,D as sa,e as ta,f as aa,g as Ue,K as la,P as ia}from"./sortable.esm-De4cortL.js";import{T as ra}from"./type-DOqr7pg5.js";import{H as na}from"./hash-C5kOXdhJ.js";import{M as ca}from"./minus-CCCsL8N7.js";import{C as oa}from"./columns-3-D2LhJmRE.js";import{M as da}from"./message-square-quote-QSvtGdI3.js";import{R as xa}from"./repeat-Bzyo7NvJ.js";import{L as as}from"./layers-Dzu1hN6i.js";import{Q as ha}from"./quote-BPj_Y_e6.js";import{A as ma}from"./award-CoYQKEQq.js";import{R as ua,Z as pa,a as ja}from"./zoom-out-DKyZmosy.js";import{T as ga}from"./timer-BUNfhu_O.js";import{C as va}from"./credit-card-CyIPEgks.js";import{S as ba}from"./share-2-ySg6qX03.js";import{P as fa}from"./phone-DY0b6ay4.js";import{T as Na}from"./toggle-left-D-Bn_MMm.js";import{P as wa}from"./play-D97WNvd1.js";import{C as Us}from"./code-Dvqr_6nk.js";import{R as ya}from"./redo-2-CbmJWvKx.js";import{L as ls}from"./link-BKA0FtFv.js";import{S as Ca}from"./scroll-area-BQtXZnuf.js";import{G as fs}from"./grip-vertical-CXGwY4jS.js";import{S as C,a as k,b as S,c as T,d as i}from"./select-DubWVshT.js";import{T as et,a as Pe}from"./toggle-group-CMTvwTF5.js";import{S as Re}from"./slider-Dfvb-YIx.js";import{T as Ee}from"./tablet-VWWqo-TL.js";import{A as st}from"./arrow-down-BufOymSL.js";import{M as Ze}from"./monitor-BThy0502.js";import{C as ka,a as Sa,b as Ta}from"./collapsible-CHuAoMFW.js";import{S as is}from"./settings-2-Pmo5V7b-.js";import{B as $s}from"./book-dashed-DUBj85Kw.js";import{C as _a}from"./compass-Czk_0Tq-.js";import{S as tt}from"./SectionPreview-jDnW7rY_.js";import{C as Pa,a as Da,b as Ia,c as ce,d as Ie}from"./context-menu-DLsz2R6S.js";import{C as La}from"./copy-plus-CbDBI1gG.js";import{C as Ra}from"./clipboard-DvtKg8d-.js";import{C as Oa}from"./clipboard-paste-CScS4YdT.js";import{F as za}from"./folder-plus-C_Qqx75d.js";import"./supabase-B2z4OhLQ.js";import"./charts-DCB9_QAo.js";import"./vendor-CIXof4MH.js";import"./index-BdQq_4o_.js";import"./index-DkD4heWV.js";import"./circle-Bi-mZyos.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Va=Se("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const Ea=Se("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/** 12 * @license lucide-react v0.462.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const at=Se("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/** 17 * @license lucide-react v0.462.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const Ma=Se("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** 22 * @license lucide-react v0.462.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const Aa=Se("Space",[["path",{d:"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1",key:"lt2kga"}]]);/** 27 * @license lucide-react v0.462.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */const $a=Se("StarHalf",[["path",{d:"M12 18.338a2.1 2.1 0 0 0-.987.244L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16l2.309-4.679A.53.53 0 0 1 12 2",key:"2ksp49"}]]);/** 32 * @license lucide-react v0.462.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */const Ga=Se("TableOfContents",[["path",{d:"M16 12H3",key:"1a2rj7"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M21 12h.01",key:"msek7k"}],["path",{d:"M21 18h.01",key:"1e8rq1"}],["path",{d:"M21 6h.01",key:"1koanj"}]]);function Ae(){try{return typeof window>"u"?"he":localStorage.getItem("app-language")||"he"}catch{return"he"}}function f(t,a,s){return t==="he"?a:s}function lt(t=Ae()){return[{type:"hero",label:f(t,"Hero","Hero"),icon:Ke,category:"basic"},{type:"text",label:f(t,"×קס×","Text"),icon:ra,category:"basic"},{type:"heading",label:f(t,"××תרת","Heading"),icon:na,category:"basic"},{type:"image",label:f(t,"ת××× ×","Image"),icon:Fe,category:"basic"},{type:"button",label:f(t,"×פת×ר","Button"),icon:Pt,category:"basic"},{type:"divider",label:f(t,"×פר××","Divider"),icon:ca,category:"basic"},{type:"spacer",label:f(t,"ר××××","Spacer"),icon:Aa,category:"basic"},{type:"icon-box",label:f(t,"ת××ת ××××§××","Icon Box"),icon:Ma,category:"basic"},{type:"columns",label:f(t,"×¢××××ת","Columns"),icon:at,category:"content"},{type:"inner-section",label:f(t,"×¡×§×©× ×¤× ×××","Inner Section"),icon:oa,category:"content"},{type:"video",label:f(t,"×××××","Video"),icon:Dt,category:"content"},{type:"testimonials",label:f(t,"×××צ×ת","Testimonials"),icon:da,category:"content"},{type:"features",label:f(t,"ת××× ×ת","Features"),icon:It,category:"content"},{type:"list",label:f(t,"רש×××","List"),icon:Lt,category:"content"},{type:"gallery",label:f(t,"××ר××","Gallery"),icon:Fe,category:"content"},{type:"logo-carousel",label:f(t,"×××××××","Logos"),icon:xa,category:"content"},{type:"tabs",label:f(t,"×××××","Tabs"),icon:as,category:"content"},{type:"quote",label:f(t,"צ××××","Quote"),icon:ha,category:"content"},{type:"team",label:f(t,"צ××ת","Team"),icon:ma,category:"content"},{type:"alert-box",label:f(t,"ת××ת ×תר××","Alert Box"),icon:Rt,category:"content"},{type:"table-of-contents",label:f(t,"ת××× ×¢× ××× ××","Table of Contents"),icon:Ga,
36category:"content"},{type:"form",label:f(t,"××פס","Form"),icon:ua,category:"interactive"},{type:"cta",label:"CTA",icon:Oe,category:"interactive"},{type:"countdown",label:f(t,"ספ××¨× ××××ר","Countdown"),icon:ga,category:"interactive"},{type:"faq",label:f(t,"ש×××ת × ×¤×צ×ת","FAQ"),icon:Ot,category:"interactive"},{type:"pricing",label:f(t,"×××ת ×××ר××","Pricing"),icon:va,category:"interactive"},{type:"counter",label:f(t,"××× ×","Counter"),icon:zt,category:"interactive"},{type:"progress-bar",label:f(t,"×× ×תק×××ת","Progress Bar"),icon:Va,category:"interactive"},{type:"social-icons",label:f(t,"רשת×ת ××רת××ת","Social Icons"),icon:ba,category:"interactive"},{type:"map",label:f(t,"×פ×","Map"),icon:Vt,category:"interactive"},{type:"contact-info",label:f(t,"פר×× ×§×©×¨","Contact Info"),icon:fa,category:"interactive"},{type:"opening-hours",label:f(t,"שע×ת פת×××","Opening Hours"),icon:Et,category:"interactive"},{type:"star-rating",label:f(t,"××ר×× ××××××","Star Rating"),icon:$a,category:"interactive"},{type:"toggle",label:"Toggle",icon:Na,category:"interactive"},{type:"scroll-to-top",label:f(t,"×××× ×××¢××","Scroll to Top"),icon:Ea,category:"interactive"},{type:"lottie",label:f(t,"×× ××צ××ת Lottie","Lottie Animation"),icon:wa,category:"interactive"},{type:"html-embed",label:f(t,"HTML ××ת××","Custom HTML"),icon:Us,category:"layout"},{type:"accordion",label:f(t,"××§×ר××××","Accordion"),icon:He,category:"layout"}]}const je=lt();function it(t=Ae()){return[{key:"basic",label:f(t,"×ס×ס×","Basic")},{key:"content",label:f(t,"ת×××","Content")},{key:"interactive",label:f(t,"××× ×ר××§××××","Interactive")},{key:"layout",label:f(t,"פר×ס×","Layout")}]}const Fa=it();function Ha(t,a=Ae()){switch(t){case"hero":return{title:"",subtitle:"",cta:f(a,"×ת×× ×¢×ש××","Get Started"),ctaUrl:"#",bgImage:""};case"text":return{text:""};case"heading":return{text:f(a,"××תרת","Heading"),level:"h2",align:"center"};case"image":return{src:"",alt:"",width:"100%",align:"center",link:"",borderRadius:"8"};case"form":return{title:f(a,"×ש×ר פר×××","Leave your details"),formFields:[{id:"f1",label:f(a,"×©× ×××","Full name"),type:"text",required:!0},{id:"f2",label:f(a,"××××××","Email"),type:"email",required:!0},{id:"f3",label:f(a,"××פ××","Phone"),type:"tel",required:!1}],submitText:f(a,"ש××","Submit"),webhookUrl:"",successMessage:f(a,"×××פס × ×©×× ××צ×××!","Form submitted successfully!"),formType:"simple"};case"columns":return{columnCount:2,columnRatio:"equal",col1Title:"",col1Text:"",col2Title:"",col2Text:""};case"inner-section":return{columnCount:2,columnRatio:"equal",columns:[{widgets:[]},{widgets:[]}]};case"cta":return{title:"",buttonText:f(a,"×ת×× ×¢×ש××","Get Started"),buttonUrl:""};case"button":return{text:f(a,"×××¥ ×××","Click here"),url:"#",variant:"primary",size:"md",target:"_self",icon:""};case"divider":return{style:"solid",thickness:"1"};case"spacer":return{height:"40"};case"video":return{url:"",type:"youtube",autoplay:!1};case"testimonials":return{items:[{name:"",text:"",role:"",avatar:""}]};case"countdown":return{targetDate:"",title:f(a,"×××צע × ××ר ××¢××:","Offer ends in:")};case"faq":return{items:[{question:"",answer:""}]};case"features":return{items:[{icon:"â",title:"",description:""}]};case"list":return{items:[""],style:"bullet"};case"map":return{address:"",zoom:"15"};case"icon-box":return{icon:"â",title:"",description:"",align:"center"};case"gallery":return{items:[{src:"",alt:""}],columns:3};case"logo-carousel":return{items:[{src:"",name:""}]};case"tabs":return{items:[{label:f(a,"××× 1","Tab 1"),content:""},{label:f(a,"××× 2","Tab 2"),content:""}]};case"quote":return{text:"",author:"",role:""};case"team":return{items:[{name:"",role:"",image:"",bio:""}]};case"pricing":return{items:[{name:f(a,"×ס×ס×","Basic"),price:"$99",period:f(a,"/×××ש","/month"),features:[f(a,"ת××× × 1","Feature 1"),f(a,"ת××× × 2","Feature 2")],cta:f(a,"×ת××","Get started"),highlighted:!1}]};case"counter":return{items:[{number:"1000",label:f(a,"××§×××ת","Customers"),suffix:"+"}]};case"progress-bar":return{items:[{label:"",value:75}]};case"social-icons":return{items:[{platform:"facebook",url:""}],size:"md"};case"contact-info":return{phone:"",email:"",address:"",whatsapp:""};case"opening-hours":return{items:[{day:f(a,"ר×ש××-×××ש×","Sunday-Thursday"),hours:"09:00-18:00"}],title:f(a,"שע×ת פת×××","Opening Hours")};case"html-embed":return{html:`<div style='padding:20px;background:#f3f4f6;border-radius:8px;text-align:center;'>${f(a,"HTML ××ת×× ××ש×ת","Custom HTML")}</div>`};case"accordion":return{items:[{title:f(a,"פר×× 1","Item 1"),content:f(a,"ת××× ×¤×¨×× 1","Item 1 content")},{title:f(a,"פר×× 2","Item 2"),content:f(a,"ת××× ×¤×¨×× 2","Item 2 content")}]};case"star-rating":return{rating:4,maxStars:5,size:"lg",color:"#f59e0b",label:""};case"alert-box":return{type:"info",title:f(a,"ש×× ××","Please note"),text:f(a,"×××× ×××עת ××××¢ ×ש×××","This is an important info message"),dismissible:!1};case"toggle":return{title:f(a,"×××¥ ××× ×פת××","Click to open"),content:f(a,"ת××× ××סתר ש××פ××¢ ××××צ×","Hidden content shown on click"),defaultOpen:!1};case"scroll-to-top":return{text:"â",showAfter:300,position:"bottom-right"};case"lottie":return{url:"",width:"200px",loop:!0,autoplay:!0};case"table-of-contents":return{title:f(a,"ת××× ×¢× ××× ××","Table of Contents"),style:"numbered"};default:return{}}}function $(t,a,s){return t==="he"?a:s}function Ba(t=Ae()){return[{id:"hero-classic",name:$(t,"Hero ×§××ס×","Classic Hero"),category:"hero",sections:[{id:"",type:"hero",order:0,content:{title:$
36(t,"×פתר×× ×××ש×× ×עסק ש××","The perfect solution for your business"),subtitle:$(t,"×× ×× × ×¢××ר×× ×עסק×× ×צ××× ×¢× ××× ×××××× ×תק××ת","We help businesses grow with advanced technology"),cta:$(t,"×ת×× ×¢×ש××","Get Started"),bgImage:""},style:{bgColor:"",textColor:"#ffffff",padding:"py-24 px-8"}}]},{id:"hero-gradient",name:$(t,"Hero ×ר×××× ×","Gradient Hero"),category:"hero",sections:[{id:"",type:"hero",order:0,content:{title:$(t,"×§× ×ת ×עסק ש×× ×ש×× ×××","Take your business to the next level"),subtitle:$(t,"פ××פ×ר×× ×××× ×©×¢×××ת ×ש×××× 24/7","A smart platform that works for you 24/7"),cta:$(t,"צ×ר קשר","Contact Us")},style:{bgGradient:"true",bgGradientFrom:"#667eea",bgGradientTo:"#764ba2",bgGradientAngle:"135deg",textColor:"#ffffff",padding:"py-24 px-8"}}]},{id:"features-3col",name:$(t,"3 ת××× ×ת","3 Features"),category:"content",sections:[{id:"",type:"features",order:0,content:{items:[{icon:"ð",title:$(t,"×××ר","Fast"),description:$(t,"××צ××¢×× ××¢×××× ××××ר×ת ××¢×× ×","Great performance and fast loading")},{icon:"ð",title:$(t,"××××××","Secure"),description:$(t,"××××× ×ר×× ×××××× ×××תר","Top-level security")},{icon:"ð±",title:$(t,"רספ×× ×¡×××","Responsive"),description:$(t,"××ת×× ××× ××¡× ×××ש×ר","Works on every screen and device")}]},style:{padding:"py-16 px-8"}}]},{id:"testimonials-block",name:$(t,"×××צ×ת ××§×××ת","Customer Testimonials"),category:"content",sections:[{id:"",type:"testimonials",order:0,content:{items:[{name:$(t,"×שר×× ×××","Daniel Cohen"),text:$(t,"ש×ר×ת ××¢×××! ×××××¥ ×××× ×××××","Excellent service! Highly recommended."),role:$(t,'×× ×"×, ××רת XYZ',"CEO, XYZ Company")},{name:$(t,"×©×¨× ×××","Sarah Levi"),text:$(t,"ת×צ××ת ××××××ת ת×× ××× ×§×¦×¨","Amazing results in a short time."),role:$(t,'ס×× ×"× ×©××××§',"VP Marketing")}]},style:{padding:"py-16 px-8",bgColor:"#f8fafc"}}]},{id:"cta-bold",name:$(t,"CTA ××××","Bold CTA"),category:"interactive",sections:[{id:"",type:"cta",order:0,content:{title:$(t,"×××× ×× ××ת×××?","Ready to get started?"),buttonText:$(t,"×§×× ×צעת ×××ר","Get a Quote")},style:{bgGradient:"true",bgGradientFrom:"#f97316",bgGradientTo:"#ef4444",bgGradientAngle:"135deg",textColor:"#ffffff",padding:"py-20 px-8"}}]},{id:"faq-section",name:$(t,"ש×××ת × ×¤×צ×ת","FAQ"),category:"interactive",sections:[{id:"",type:"faq",order:0,content:{items:[{question:$(t,"××× ×× ×¢×××?","How much does it cost?"),answer:$(t,"××××ר×× ××ת×××× ××ש×ת ××× ××§××. ×¦×¨× ×§×©×¨ ××§××ת ×צעת ×××ר.","Pricing is tailored to each client. Contact us for a quote.")},{question:$(t,"××× ××× ×××§×?","How long does it take?"),answer:$(t,"××§×× ×ª×× 48 שע×ת, ת×צ××ת ר×ש×× ×ת ת×× ×©×××¢.","Setup within 48 hours, first results within a week.")},{question:$(t,"××× ×ש ×ת×××××ת?","Is there a commitment?"),answer:$(t,"××× ×ת×××××ת. × ××ª× ×××× ××× ×¢×ª.","No commitment. You can cancel anytime.")}]},style:{padding:"py-16 px-8"}}]}]}const Ns=Ba();function Wa(t=Ae()){return[{key:"hero",label:"Hero"},{key:"content",label:$(t,"ת×××","Content")},{key:"interactive",label:$(t,"××× ×ר××§××××","Interactive")}]}const rt=Wa();function qa({onImportSections:t,children:a}){const[s,j]=D.useState(!1),[d,l]=D.useState(""),[r,n]=D.useState(!1),{language:o,t:b}=ve(),N=async()=>{var v;if(!d.trim())return;let p=d.trim();p.startsWith("http")||(p=`https://${p}`),n(!0);try{const{data:h,error:I}=await ee.functions.invoke("scrape-page-structure",{body:{url:p}});if(I)throw I;if(!((v=h==null?void 0:h.sections)!=null&&v.length)){V.error(b("importUrl.emptyError"));return}t(h.sections),V.success(b("importUrl.success").replace("{n}",String(h.sections.length))),j(!1),l("")}catch(h){console.error(h),V.error(b("importUrl.error"))}finally{n(!1)}};return e.jsxs(ns,{open:s,onOpenChange:j,children:[e.jsx(Ys,{asChild:!0,children:a}),e.jsxs(cs,{dir:o==="he"?"rtl":"ltr",className:"sm:max-w-md",children:[e.jsx(os,{children:e.jsxs(ds,{className:"flex items-center gap-2",children:[e.jsx(Oe,{className:"w-5 h-5"}),b("importUrl.title")]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:b("importUrl.description")}),e.jsx(m,{placeholder:"https://example.com",value:d,onChange:p=>l(p.target.value),dir:"ltr",className:"font-mono text-sm",onKeyDown:p=>p.key==="Enter"&&!r&&N()}),e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-muted/50 text-xs text-muted-foreground",children:[e.jsx(Ye,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:b("importUrl.hint")})]}),e.jsx(_,{onClick:N,disabled:!d.trim()||r,className:"w-full gap-2",children:r?e.jsxs(e.Fragment,{children:[e.jsx(es,{className:"w-4 h-4 animate-spin"}),b("importUrl.loading")]}):e.jsxs(e.Fragment,{children:[e.jsx(Oe,{className:"w-4 h-4"}),b("importUrl.action")]})})]})]})]})}function Za({pageName:t,pageSlug:a,pageStatus:s,canUndo:j,canRedo:d,onBack:l,onUndo:r,onRedo:n,onTogglePublish:o,onExport:b,onImport:N,onPreview:p,onImportFromUrl:v}){const[h,I]=D.useState(!1),{language:B,t:L}=ve(),E=s==="published",M=B==="he",G=M?Le:Mt,z=M?{back:"×××¨× ×רש×××",export:"××צ××",import:"×××××",importFromSite:"××××× ××תר",preview:"תצ××× ××§××××",copyLink:"×עתק ××× ×§",copied:"××עתק!",publish:"פרס×",published:"×פ×רס×"}:{back:"Back to list",export:"Export",import:"Import",importFromSite:"Import from website",preview:"Preview",copyLink:"Copy link",copied:"Copied!",publish:"Publish",published:"Published"},Z=()=>{navigator.clipboard.writeText(`https://blacksheepbi.com/lp/${a}`),I(!0),V.success(L("landing.linkCopied")),setTimeout(()=>I(!1),2e3)};return e.jsx(ss,{delayDuration:300,children:e.jsxs("div",{className:"h-11 bg-[#23272f] text-white flex items-center justify-between px-3 shrink-0 z-50 border-b border-white/10",dir:M?"rtl":"ltr",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx("button",{onClick:l,className:"w-8 h-8 rounded flex items-center justify-center hover:bg-white/10 transition-colors",children:e.jsx(G,{className:"w-4 h-4"})})}),e.jsx(he,{side:"bottom",className:"text-xs",children:z.back})]}),e.jsx("span",{className:"text-sm font-medium truncate max-w-[140px]",children:t}),e.jsxs(pe,{variant:"outline",className:"text-[9px] border-white/20 text-white/40 font-mono hidden sm:inline-flex",children:["/",a]})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx("button",{className:"p-1.5 rounded text-white/40 hover:text-white hover:bg-white/10 disabled:opacity-20 disabled:cursor-not-allowed transition-all",onClick:r,disabled:!j,children:e.jsx(At,{className:"w-3.5 h-3.5"})})}),e.jsx(he,{side:"bottom",className:"text-xs",children:"Ctrl+Z"})]}),e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx("button",{className:"p-1.5 rounded text-white/40 hover:text-white hover:bg-white/10 disabled:opacity-20 disabled:cursor-not-allowed transition-all",onClick:n,disabled:!d,children:e.jsx(ya,{className:"w-3.5 h-3.5"})})}),e.jsx(he,{side:"bottom",className:"text-xs",children:"Ctrl+Shift+Z"})]})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx("button",{className:"p-1.5 rounded text-white/40 hover:text-white hover:bg-white/10 transition-all",onClick:b,children:e.jsx($t,{className:"w-3.5 h-3.5"})})}),e.jsx(he,{side:"bottom",className:"text-xs",children:z.export})]}),e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx("button",{className:"p-1.5 rounded text-white/40 hover:text-white hover:bg-white/10 transition-all",onClick:N,children:e.jsx(Be,{className:"w-3.5 h-3.5"})})}),e.jsx(he,{side:"bottom",className:"text-xs",children:z.import})]}),e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx(qa,{onImportSections:v,children:e.jsx("button",{className:"p-1.5 rounded text-white/40 hover:text-white hover:bg-white/10 transition-all",children:e.jsx(xs,{className:"w-3.5 h-3.5"})})})}),e.jsx(he,{side:"bottom",className:"text-xs",children:z.importFromSite})]}),e.jsx("div",{className:"w-px h-4 bg-white/10 mx-0.5"}),e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx("button",{className:"p-1.5 rounded text-white/40 hover:text-white hover:bg-white/10 transition-all",onClick:p,children:e.jsx(Me,{className:"w-3.5 h-3.5"})})}),e.jsx(he,{side:"bottom",className:"text-xs",children:z.preview})]}),E&&e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx("button",{className:"p-1.5 rounded text-white/40 hover:text-white hover:bg-white/10 transition-all",onClick:Z,children:h?e.jsx(ts,{className:"w-3.5 h-3.5 text-green-400"}):e.jsx(ls,{className:"w-3.5 h-3.5"})})}),e.jsx(he,{side:"bottom",className:"text-xs",children:h?z.copied:z.copyLink})]}),e.jsxs(_,{size:"sm",className:`mr-1.5 h-7 text-[11px] gap-1 px-3 ${E?"bg-green-600 hover:bg-green-700":"bg-emerald-500 hover:bg-emerald-600"}`,onClick:o,children:[e.jsx(Oe,{className:"w-3 h-3"}),E?z.published:z.publish]})]})]})})}function Gs({type:t,label:a,icon:s,onAdd:j}){const{attributes:d,listeners:l,setNodeRef:r,transform:n,isDragging:o}=Kt({id:`widget-${t}`,data:{type:t,isNewWidget:!0}}),b=n?{transform:`translate3d(${n.x}px, ${n.y}px, 0)`,zIndex:100,opacity:.8}:void 0;return e.jsxs("button",{ref:r,...l,...d,style:b,className:`h-auto py-3 px-2 flex flex-col items-center justify-center gap-1.5 text-[11px] font-normal rounded-lg 37 border border-white/10 hover:border-primary/50 hover:bg-white/10 transition-all cursor-grab active:cursor-grabbing 38 ${o?"ring-2 ring-primary shadow-lg bg-white/15 scale-105":"bg-white/[0.04]"}`,onClick:()=>j(t),children:[e.jsx(s,{className:"w-5 h-5 text-white/50"}),e.jsx("span",{className:"text-white/70 leading-tight text-center",children:a})]})}function Xa({onAdd:t}){const[a,s]=D.useState(""),{t:j,dir:d,language:l}=ve(),r=d==="rtl",n=lt(l),o=it(l),b=a.trim()?n.filter(N=>N.label.toLowerCase().includes(a.toLowerCase())||N.type.includes(a.toLowerCase())):null;return e.jsxs("div",{className:"space-y-4",dir:d,children:[e.jsxs("div",{className:"relative",children:[e.jsx(hs,{className:`absolute ${r?"right-2.5":"left-2.5"} top-1/2 -translate-y-1/2 w-4 h-4 text-white/30`}),e.jsx(m,{placeholder:j("widgets.searchPlaceholder"),value:a,onChange:N=>
38s(N.target.value),className:`h-9 text-xs ${r?"pr-9":"pl-9"} bg-white/5 border-white/10 text-white placeholder:text-white/30 focus:border-primary/50`})]}),e.jsx("div",{className:"space-y-5",children:b?b.length===0?e.jsx("p",{className:"text-xs text-white/30 text-center py-8",children:j("widgets.noResults")}):e.jsx("div",{className:"grid grid-cols-3 gap-2",children:b.map(N=>e.jsx(Gs,{type:N.type,label:N.label,icon:N.icon,onAdd:t},N.type))}):o.map(N=>{const p=n.filter(v=>v.category===N.key);return e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-semibold text-white/40 uppercase tracking-wider mb-2.5",children:N.label}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:p.map(v=>e.jsx(Gs,{type:v.type,label:v.label,icon:v.icon,onAdd:t},v.type))})]},N.key)})})]})}const Fs={he:{searchPlaceholder:"×פש ×××× ×...",noResults:"×× × ×צ×× ×××× ×××",noElements:"××× ×××× ××× ×××£",body:"×××£ ×××£"},en:{searchPlaceholder:"Search element...",noResults:"No elements found",noElements:"No elements on page",body:"Body"},it:{searchPlaceholder:"Cerca elemento...",noResults:"Nessun elemento trovato",noElements:"Nessun elemento nella pagina",body:"Corpo"},fr:{searchPlaceholder:"Rechercher un élément...",noResults:"Aucun élément trouvé",noElements:"Aucun élément sur la page",body:"Corps"},pt:{searchPlaceholder:"Buscar elemento...",noResults:"Nenhum elemento encontrado",noElements:"Nenhum elemento na página",body:"Corpo"}};function Ka({sections:t,selectedId:a,onSelect:s,onToggleHidden:j}){const[d,l]=D.useState(""),[r,n]=D.useState(new Set),{language:o}=ve(),b=Fs[o]??Fs.en,N=v=>{n(h=>{const I=new Set(h);return I.has(v)?I.delete(v):I.add(v),I})},p=d.trim()?t.filter(v=>{const h=je.find(B=>B.type===v.type);return(v.label||(h==null?void 0:h.label)||v.type).toLowerCase().includes(d.toLowerCase())}):t;return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx(hs,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-white/30"}),e.jsx(m,{placeholder:b.searchPlaceholder,value:d,onChange:v=>l(v.target.value),className:"h-7 text-[11px] pr-7 bg-white/5 border-white/10 text-white placeholder:text-white/30"})]}),p.length===0?e.jsx("p",{className:"text-[10px] text-white/30 text-center py-6",children:d?b.noResults:b.noElements}):e.jsxs("div",{className:"space-y-px",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 text-[11px] text-white/50 font-semibold uppercase tracking-wider",children:[e.jsx(He,{className:"w-3 h-3"}),e.jsx("span",{children:b.body})]}),p.map(v=>{const h=je.find(M=>M.type===v.type),I=(h==null?void 0:h.icon)||je[0].icon,B=v.label||(h==null?void 0:h.label)||v.type,L=a===v.id,E=r.has(v.id);return e.jsxs("div",{children:[e.jsxs("div",{className:`flex items-center gap-1 px-1 py-1 rounded cursor-pointer text-[11px] transition-all group ${L?"bg-blue-500/20 text-blue-400 border-r-2 border-blue-500":"hover:bg-white/5 text-white/70"} ${v.hidden?"opacity-40":""}`,onClick:()=>s(v.id),children:[e.jsx("div",{className:"opacity-0 group-hover:opacity-60 cursor-grab active:cursor-grabbing shrink-0",children:e.jsx(fs,{className:"w-3 h-3"})}),e.jsx("button",{className:"shrink-0 p-0.5 rounded hover:bg-white/10",onClick:M=>{M.stopPropagation(),N(v.id)},children:E?e.jsx(Le,{className:"w-3 h-3 text-white/40"}):e.jsx(He,{className:"w-3 h-3 text-white/40"})}),e.jsx(I,{className:"w-3.5 h-3.5 shrink-0"}),e.jsx("span",{className:"flex-1 truncate",children:B}),e.jsx("button",{className:"p-0.5 rounded opacity-0 group-hover:opacity-100 hover:bg-white/10 transition-opacity shrink-0",onClick:M=>{M.stopPropagation(),j(v.id)},children:v.hidden?e.jsx(Je,{className:"w-3 h-3 text-white/40"}):e.jsx(Me,{className:"w-3 h-3 text-white/30"})})]}),!E&&e.jsx("div",{className:"mr-6 border-r border-white/5",children:e.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-0.5 text-[9px] text-white/30",children:[e.jsx(I,{className:"w-2.5 h-2.5"}),e.jsx("span",{children:(h==null?void 0:h.label)||v.type})]})})]},v.id)})]})]})}const Xe="__empty__",Hs=t=>t&&t.length>0?t:Xe,Bs=t=>t===Xe?"":t;function Ya({style:t,onChange:a}){return e.jsx(We,{children:e.jsxs(qe,{className:"p-3 space-y-3",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground",children:"ס×× ×× ×××××× ×××£"}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"פ×× × ×¨×ש×"}),e.jsxs(C,{value:Hs(t.fontFamily),onValueChange:s=>a({fontFamily:Bs(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×ר×רת ××××"})}),e.jsxs(T,{children:[e.jsx(i,{value:Xe,children:"×ר×רת ××××"}),e.jsx(i,{value:"'Assistant', sans-serif",children:"Assistant"}),e.jsx(i,{value:"'Heebo', sans-serif",children:"Heebo"}),e.jsx(i,{value:"'Rubik', sans-serif",children:"Rubik"}),e.jsx(i,{value:"'Noto Sans Hebrew', sans-serif",children:"Noto Sans Hebrew"}),e.jsx(i,{value:"'Open Sans', sans-serif",children:"Open Sans"}),e.jsx(i,{value:"'Montserrat', sans-serif",children:"Montserrat"}),e.jsx(i,{value:"'Frank Ruhl Libre', serif",children:"Frank Ruhl Libre"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"צ××¢ רקע"}),e.jsx(m,{type:"color",value:t.bgColor||"#ffffff",onChange:s=>a({bgColor:s.target.value}),className:"h-8"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"צ××¢ ×קס×"}),e.jsx(m,{type:"color",value:t.textColor||"#1a1a1a",onChange:s=>a({textColor:s.target.value}),className:"h-8"})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"צ××¢ ×§×ש×ר××"}),e.jsx(m,{type:"color",value:t.linkColor||"#3b82f6",onChange:s=>a({linkColor:s.target.value}),className:"h-8"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"ר××× ×קס××××"}),e.jsxs(C,{value:Hs(t.maxWidth),onValueChange:s=>a({maxWidth:Bs(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:Xe,children:"××× (100%)"}),e.jsx(i,{value:"960px",children:"960px"}),e.jsx(i,{value:"1140px",children:"1140px"}),e.jsx(i,{value:"1280px",children:"1280px"}),e.jsx(i,{value:"1440px",children:"1440px"})]})]})]})]})})}const Ws={he:{seo:"SEO",metaTitle:"××תרת (Meta Title)",metaTitlePlaceholder:"××תרת ×××£ ××× ××¢× ××פ×ש",metaDescription:"ת×××ר (Meta Description)",metaDescriptionPlaceholder:"ת×××ר קצר ×ת×צ××ת ××פ×ש",social:"ש×ת××£ ×רשת×ת (Open Graph)",ogTitle:"OG ××תרת",ogTitlePlaceholder:"××תרת ×ש×ת××£",ogDescription:"OG ת×××ר",ogDescriptionPlaceholder:"ת×××ר ×ש×ת××£",ogImage:"OG ת××× × (URL)",favicon:"Favicon (URL)",customCode:"×§×× ××ת××",headCode:"×§×× ×ר×ש ×××£ (Head)",bodyCode:"×§×× ×ת×ת×ת ×××£ (Body)"},en:{seo:"SEO",metaTitle:"Title (Meta Title)",metaTitlePlaceholder:"Page title for search engines",metaDescription:"Description (Meta Description)",metaDescriptionPlaceholder:"Short description for search results",social:"Social Sharing (Ope
38n Graph)",ogTitle:"OG Title",ogTitlePlaceholder:"Title for sharing",ogDescription:"OG Description",ogDescriptionPlaceholder:"Description for sharing",ogImage:"OG Image (URL)",favicon:"Favicon (URL)",customCode:"Custom Code",headCode:"Code in page head (Head)",bodyCode:"Code at page bottom (Body)"},it:{seo:"SEO",metaTitle:"Titolo (Meta Title)",metaTitlePlaceholder:"Titolo della pagina per i motori di ricerca",metaDescription:"Descrizione (Meta Description)",metaDescriptionPlaceholder:"Breve descrizione per i risultati di ricerca",social:"Condivisione Social (Open Graph)",ogTitle:"Titolo OG",ogTitlePlaceholder:"Titolo per la condivisione",ogDescription:"Descrizione OG",ogDescriptionPlaceholder:"Descrizione per la condivisione",ogImage:"Immagine OG (URL)",favicon:"Favicon (URL)",customCode:"Codice personalizzato",headCode:"Codice nella testa della pagina (Head)",bodyCode:"Codice in fondo alla pagina (Body)"},fr:{seo:"SEO",metaTitle:"Titre (Meta Title)",metaTitlePlaceholder:"Titre de la page pour les moteurs de recherche",metaDescription:"Description (Meta Description)",metaDescriptionPlaceholder:"Courte description pour les résultats de recherche",social:"Partage social (Open Graph)",ogTitle:"Titre OG",ogTitlePlaceholder:"Titre pour le partage",ogDescription:"Description OG",ogDescriptionPlaceholder:"Description pour le partage",ogImage:"Image OG (URL)",favicon:"Favicon (URL)",customCode:"Code personnalisé",headCode:"Code dans lâen-tête de la page (Head)",bodyCode:"Code en bas de page (Body)"},pt:{seo:"SEO",metaTitle:"TÃtulo (Meta Title)",metaTitlePlaceholder:"TÃtulo da página para mecanismos de busca",metaDescription:"Descrição (Meta Description)",metaDescriptionPlaceholder:"Descrição curta para resultados de busca",social:"Compartilhamento Social (Open Graph)",ogTitle:"TÃtulo OG",ogTitlePlaceholder:"TÃtulo para compartilhamento",ogDescription:"Descrição OG",ogDescriptionPlaceholder:"Descrição para compartilhamento",ogImage:"Imagem OG (URL)",favicon:"Favicon (URL)",customCode:"Código personalizado",headCode:"Código no cabeçalho da página (Head)",bodyCode:"Código no final da página (Body)"}};function Ja({settings:t,onChange:a}){const{language:s}=ve(),j=Ws[s]??Ws.en;return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-white/40 uppercase tracking-wider",children:j.seo}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] text-white/60",children:j.metaTitle}),e.jsx(m,{placeholder:j.metaTitlePlaceholder,value:t.meta_title||"",onChange:d=>a({meta_title:d.target.value}),className:"h-8 text-xs bg-white/5 border-white/10 text-white",maxLength:60}),e.jsxs("p",{className:"text-[9px] text-white/30 mt-0.5",children:[(t.meta_title||"").length,"/60"]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] text-white/60",children:j.metaDescription}),e.jsx(te,{placeholder:j.metaDescriptionPlaceholder,value:t.meta_description||"",onChange:d=>a({meta_description:d.target.value}),className:"text-xs bg-white/5 border-white/10 text-white",rows:3,maxLength:160}),e.jsxs("p",{className:"text-[9px] text-white/30 mt-0.5",children:[(t.meta_description||"").length,"/160"]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-white/40 uppercase tracking-wider",children:j.social}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] text-white/60",children:j.ogTitle}),e.jsx(m,{placeholder:j.ogTitlePlaceholder,value:t.ogTitle||"",onChange:d=>a({ogTitle:d.target.value}),className:"h-8 text-xs bg-white/5 border-white/10 text-white"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] text-white/60",children:j.ogDescription}),e.jsx(m,{placeholder:j.ogDescriptionPlaceholder,value:t.ogDescription||"",onChange:d=>a({ogDescription:d.target.value}),className:"h-8 text-xs bg-white/5 border-white/10 text-white"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] text-white/60",children:j.ogImage}),e.jsx(m,{placeholder:"https://...",value:t.ogImage||"",onChange:d=>
38a({ogImage:d.target.value}),className:"h-8 text-xs bg-white/5 border-white/10 text-white",dir:"ltr"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] text-white/60",children:j.favicon}),e.jsx(m,{placeholder:"https://...",value:t.favicon||"",onChange:d=>a({favicon:d.target.value}),className:"h-8 text-xs bg-white/5 border-white/10 text-white",dir:"ltr"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-white/40 uppercase tracking-wider",children:j.customCode}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] text-white/60",children:j.headCode}),e.jsx(te,{placeholder:"<script>...<\/script>",value:t.customHeadCode||"",onChange:d=>a({customHeadCode:d.target.value}),className:"text-xs font-mono bg-white/5 border-white/10 text-white",rows:4,dir:"ltr"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] text-white/60",children:j.bodyCode}),e.jsx(te,{placeholder:"<script>...<\/script>",value:t.customBodyCode||"",onChange:d=>a({customBodyCode:d.target.value}),className:"text-xs font-mono bg-white/5 border-white/10 text-white",rows:4,dir:"ltr"})]})]})]})]})}const K="__empty__",Y=t=>t&&t.length>0?t:K,J=t=>t===K?"":t;function nt({style:t,onChange:a}){return e.jsx("div",{className:"border rounded-lg p-3 mb-3 bg-muted/30 space-y-3",dir:"rtl",children:e.jsxs(ms,{defaultValue:"colors",dir:"rtl",children:[e.jsxs(us,{className:"w-full grid grid-cols-5 h-8",children:[e.jsx(me,{value:"colors",className:"text-[10px] h-7",children:"צ××¢××"}),e.jsx(me,{value:"typography",className:"text-[10px] h-7",children:"××פ××רפ××"}),e.jsx(me,{value:"spacing",className:"text-[10px] h-7",children:"ר××××"}),e.jsx(me,{value:"effects",className:"text-[10px] h-7",children:"×פק×××"}),e.jsx(me,{value:"advanced",className:"text-[10px] h-7",children:"×תק××"})]}),e.jsxs(ue,{value:"colors",className:"mt-2 space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"צ××¢ רקע"}),e.jsx(m,{type:"color",value:t.bgColor||"#ffffff",onChange:s=>a({bgColor:s.target.value}),className:"h-8"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"צ××¢ ×קס×"}),e.jsx(m,{type:"color",value:t.textColor||"#000000",onChange:s=>a({textColor:s.target.value}),className:"h-8"})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"×ר×××× × ×¨×§×¢"}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[e.jsx(m,{type:"color",value:t.bgGradientFrom||"#3b82f6",onChange:s=>a({bgGradientFrom:s.target.value}),className:"h-8",title:"×..."}),e.jsx(m,{type:"color",value:t.bgGradientTo||"#7c3aed",onChange:s=>a({bgGradientTo:s.target.value}),className:"h-8",title:"×..."}),e.jsxs(C,{value:Y(t.bgGradientAngle),onValueChange:s=>{const j=J(s);a({bgGradientAngle:j,bgGradient:j?"true":""})},children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××"}),e.jsx(i,{value:"135deg",children:"â ×××ס×× ×"}),e.jsx(i,{value:"90deg",children:"â ××פק×"}),e.jsx(i,{value:"180deg",children:"â ×× ××"}),e.jsx(i,{value:"45deg",children:"â ×××ס×× × ×פ××"}),e.jsx(i,{value:"0deg",children:"â ×××¢××"}),e.jsx(i,{value:"270deg",children:"â ש××××"})]})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"ת××× ×ª רקע"}),e.jsx(m,{placeholder:"URL ת××× ×ª רקע",value:t.bgImage||"",onChange:s=>a({bgImage:s.target.value}),className:"h-8 text-xs mt-1",dir:"ltr"}),t.bgImage&&e.jsxs("div",{className:"grid grid-cols-2 gap-2 mt-1",children:[e.jsxs(C,{value:t.bgImageSize||"cover",onValueChange:s=>a({bgImageSize:s}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"cover",children:"Cover"}),e.jsx(i,{value:"contain",children:"Contain"}),e.jsx(i,{value:"auto",children:"Auto"})]})]}),e.jsxs(C,{value:t.bgImagePosition||"center",onValueChange:s=>a({bgImagePosition:s}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"center",children:"×ר××"}),e.jsx(i,{value:"top",children:"×××¢××"}),e.jsx(i,{value:"bottom",children:"××××"}),e.jsx(i,{value:"left",children:"ש×××"}),e.jsx(i,{value:"right",children:"××××"})]})]})]})]}),(t.bgImage||t.bgVideo)&&e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"ש××ת ××ס×× (Overlay)"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mt-1",children:[e.jsx(m,{type:"color",value:t.bgOverlayColor||"#000000",onChange:s=>a({bgOverlayColor:s.target.value}),className:"h-8"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Re,{value:[parseInt(t.bgOverlayOpacity||"50")],min:0,max:100,step:5,onValueChange:([s])=>a({bgOverlayOpacity:String(s)}),className:"flex-1"}),e.jsxs("span",{className:"text-[10px] w-8",children:[t.bgOverlayOpacity||50,"%"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(be,{checked:t.bgParallax||!1,onCheckedChange:s=>a({bgParallax:s})}),e.jsx(g,{className:"text-[10px]",children:"××¤×§× Parallax"})]})]})]}),e.jsxs(ue,{value:"typography",className:"mt-2 space-y-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"פ×× ×"}),e.jsxs(C,{value:Y(t.fontFamily),onValueChange:s=>a({fontFamily:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×ר×רת ××××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×ר×רת ××××"}),e.jsx(i,{value:"'Assistant', sans-serif",children:"Assistant"}),e.jsx(i,{value:"'Heebo', sans-serif",children:"Heebo"}),e.jsx(i,{value:"'Rubik', sans-serif",children:"Rubik"}),e.jsx(i,{value:"'Noto Sans Hebrew', sans-serif",children:"Noto Sans Hebrew"}),e.jsx(i,{value:"'Open Sans', sans-serif",children:"Open Sans"}),e.jsx(i,{value:"'Montserrat', sans-serif",children:"Montserrat"}),e.jsx(i,{value:"'Playfair Display', serif",children:"Playfair Display"}),e.jsx(i,{value:"'Frank Ruhl Libre', serif",children:"Frank Ruhl Libre"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×××× ×¤×× ×"}),e.jsxs(C,{value:Y(t.fontSize),onValueChange:s=>a({fontSize:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×ר×רת ××××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×ר×רת ××××"}),e.jsx(i,{value:"text-xs",children:"XS"}),e.jsx(i,{value:"text-sm",children:"×§××"}),e.jsx(i,{value:"text-base",children:"ר×××"}),e.jsx(i,{value:"text-lg",children:"××××"}),e.jsx(i,{value:"text-xl",children:"XL"}),e.jsx(i,{value:"text-2xl",children:"2XL"}),e.jsx(i,{value:"text-3xl",children:"3XL"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×¢××× ×¤×× ×"}),e.jsxs(C,{value:Y(t.fontWeight),onValueChange:s=>a({fontWeight:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×ר×רת ××××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×ר×רת ××××"}),e.jsx(i,{value:"font-thin",children:"××§××§"}),e.jsx(i,{value:"font-light",children:"××§"}),e.jsx(i,{value:"font-normal",children:"ר×××"}),e.jsx(i,{value:"font-medium",children:"××× ×× ×"}),e.jsx(i,{value:"font-semibold",children:"××¦× ×¢××"}),e.jsx(i,{value:"font-bold",children:"×¢××"}),e.jsx(i,{value:"font-black",children:"ש××ר"})]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×××× ×©×ר×"}),e.jsxs(C,{value:Y(t.lineHeight),onValueChange:s=>a({lineHeight:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×ר×רת ××××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×ר×רת ××××"}),e.jsx(i,{value:"leading-none",children:"צפ××£ (1)"}),e.jsx(i,{value:"leading-tight",children:"××××§ (1.25)"}),e.jsx(i,{value:"leading-snug",children:"××¢× ××××§ (1.375)"}),e.jsx(i,{value:"leading-normal",children:"ר××× (1.5)"}),e.jsx(i,{value:"leading-relaxed",children:"×ר××× (1.625)"}),e.jsx(i,{value:"leading-loose",children:"ר×× (2)"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"ר×××× ××ת××ת"}),e.jsxs(C,{value:Y(t.letterSpacing),onValueChange:s=>a({letterSpacing:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×ר×רת ××××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×ר×רת ××××"}),e.jsx(i,{value:"tracking-tighter",children:"צפ××£ ××××"}),e.jsx(i,{value:"tracking-tight",children:"צפ××£"}),e.jsx(i,{value:"tracking-normal",children:"ר×××"}),e.jsx(i,{value:"tracking-wide",children:"ר××"}),e.jsx(i,{value:"tracking-wider",children:"ר×× ××תר"}),e.jsx(i,{value:"tracking-widest",children:"ר×× ××××"})]})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"××ש×ר ×קס×"}),e.jsxs(C,{value:Y(t.textAlign),onValueChange:s=>a({textAlign:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×ר×רת ××××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×ר×רת ××××"}),e.jsx(i,{value:"text-right",children:"××××"}),e.jsx(i,{value:"text-center",children:"×ר××"}),e.jsx(i,{value:"text-left",children:"ש×××"}
38),e.jsx(i,{value:"text-justify",children:"×××שר"})]})]})]})]}),e.jsxs(ue,{value:"spacing",className:"mt-2 space-y-3",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"ר×××× ×¤× ××× (Padding)"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mt-1",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×××¢×× (px)"}),e.jsx(m,{type:"number",value:t.paddingTop||"32",onChange:s=>a({paddingTop:s.target.value}),className:"h-8 text-xs",min:"0"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×××× (px)"}),e.jsx(m,{type:"number",value:t.paddingBottom||"32",onChange:s=>a({paddingBottom:s.target.value}),className:"h-8 text-xs",min:"0"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×××× (px)"}),e.jsx(m,{type:"number",value:t.paddingRight||"24",onChange:s=>a({paddingRight:s.target.value}),className:"h-8 text-xs",min:"0"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"ש××× (px)"}),e.jsx(m,{type:"number",value:t.paddingLeft||"24",onChange:s=>a({paddingLeft:s.target.value}),className:"h-8 text-xs",min:"0"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"ר×××× ××צ×× × (Margin)"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mt-1",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×××¢×× (px)"}),e.jsx(m,{type:"number",value:t.marginTop||"0",onChange:s=>a({marginTop:s.target.value}),className:"h-8 text-xs"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×××× (px)"}),e.jsx(m,{type:"number",value:t.marginBottom||"0",onChange:s=>a({marginBottom:s.target.value}),className:"h-8 text-xs"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"×××××ת"}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[e.jsxs(C,{value:Y(t.borderWidth),onValueChange:s=>a({borderWidth:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××"}),e.jsx(i,{value:"border",children:"××§"}),e.jsx(i,{value:"border-2",children:"××× ×× ×"}),e.jsx(i,{value:"border-4",children:"×¢××"})]})]}),e.jsx(m,{type:"color",value:t.borderColor||"#e5e7eb",onChange:s=>a({borderColor:s.target.value}),className:"h-8"}),e.jsxs(C,{value:Y(t.borderRadius),onValueChange:s=>a({borderRadius:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××"}),e.jsx(i,{value:"rounded",children:"×§××"}),e.jsx(i,{value:"rounded-lg",children:"××× ×× ×"}),e.jsx(i,{value:"rounded-xl",children:"××××"}),e.jsx(i,{value:"rounded-2xl",children:"XL"}),e.jsx(i,{value:"rounded-3xl",children:"2XL"})]})]})]})]})]}),e.jsxs(ue,{value:"effects",className:"mt-2 space-y-3",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"צ×"}),e.jsxs(C,{value:Y(t.boxShadow),onValueChange:s=>a({boxShadow:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××"}),e.jsx(i,{value:"shadow-sm",children:"×¢×××"}),e.jsx(i,{value:"shadow",children:"ר×××"}),e.jsx(i,{value:"shadow-md",children:"××× ×× ×"}),e.jsx(i,{value:"shadow-lg",children:"××××"}),e.jsx(i,{value:"shadow-xl",children:"XL"}),e.jsx(i,{value:"shadow-2xl",children:"2XL"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"×× ××צ××ת ×× ×ס×"}),e.jsxs(C,{value:Y(t.animation),onValueChange:s=>a({animation:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××"}),e.jsx(i,{value:"fade-in",children:"Fade In"}),e.jsx(i,{value:"slide-up",children:"Slide Up"}),e.jsx(i,{value:"slide-right",children:"Slide Right"}),e.jsx(i,{value:"slide-left",children:"Slide Left"}),e.jsx(i,{value:"zoom-in",children:"Zoom In"}),e.jsx(i,{value:"bounce-in",children:"Bounce In"}),e.jsx(i,{value:"flip-in",children:"Flip In"})]})]}),t.animation&&e.jsxs("div",{className:"grid grid-cols-2 gap-2 mt-1",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"××©× (ms)"}),e.jsxs(C,{value:t.animationDuration||"600",onValueChange:s=>a({animationDuration:s}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"300",children:"×××ר (300ms)"}),e.jsx(i,{value:"600",children:"ר××× (600ms)"}),e.jsx(i,{value:"1000",children:"×××× (1s)"}),e.jsx(i,{value:"1500",children:"×××× ×××× (1.5s)"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×ש××× (ms)"}),e.jsxs(C,{value:t.animationDelay||"0",onValueChange:s=>a({animationDelay:s}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"0",children:"×××"}),e.jsx(i,{value:"200",children:"200ms"}),e.jsx(i,{value:"500",children:"500ms"}),e.jsx(i,{value:"1000",children:"1s"})]})]})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"Shape Divider"}),e.jsxs(C,{value:Y(t.shapeDivider),onValueChange:s=>a({shapeDivider:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××"}),e.jsx(i,{value:"wave",children:"××"}),e.jsx(i,{value:"triangle",children:"×ש××ש"}),e.jsx(i,{value:"curve",children:"×¢×§×××"}),e.jsx(i,{value:"tilt",children:"ש×פ××¢"}),e.jsx(i,{value:"zigzag",children:"×××××"})]})]}),t.shapeDivider&&e.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[e.jsx(m,{type:"color",value:t.shapeDividerColor||"#ffffff",onChange:s=>a({shapeDividerColor:s.target.value}),className:"h-8"}),e.jsxs(C,{value:t.shapeDividerHeight||"40",onValueChange:s=>a({shapeDividerHeight:s}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"20",children:"×§××"}),e.jsx(i,{value:"40",children:"××× ×× ×"}),e.jsx(i,{value:"60",children:"××××"}),e.jsx(i,{value:"80",children:"×¢× ×§"})]})]}),e.jsxs(C,{value:t.shapeDividerPosition||"bottom",onValueChange:s=>a({shapeDividerPosition:s}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"top",children:"×××¢××"}),e.jsx(i,{value:"bottom",children:"××××"}),e.jsx(i,{value:"both",children:"×©× ×××"})]})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"××¤×§× ×ª× ××¢× (Motion)"}),e.jsxs(C,{value:Y(t.motionEffect),onValueChange:s=>a({motionEffect:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××"}),e.jsx(i,{value:"floating",children:"ר××××£ (Floating)"}),e.jsx(i,{value:"pulse-grow",children:"פע××× (Pulse)"}),e.jsx(i,{value:"rotate",children:"ס×××× (Rotate)"})]})]}),t.motionEffect&&e.jsxs(C,{value:t.motionSpeed||"normal",onValueChange:s=>a({motionSpeed:s}),children:[e.jsx(k,{className:"h-8 text-[10px] mt-1",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"fast",children:"×××ר"}),e.jsx(i,{value:"normal",children:"ר×××"}),e.jsx(i,{value:"slow",children:"××××"})]})]})]})]}),e.jsxs(ue,{value:"advanced",className:"mt-2 space-y-3",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"×××× ××× ××××"}),e.jsxs(C,{value:Y(t.minHeight),onValueChange:s=>a({minHeight:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××××××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××××××"}),e.jsx(i,{value:"200px",children:"200px"}),e.jsx(i,{value:"300px",children:"300px"}),e.jsx(i,{value:"400px",children:"400px"}),e.jsx(i,{value:"500px",children:"500px"}),e.jsx(i,{value:"100vh",children:"××¡× ××× (100vh)"}),e.jsx(i,{value:"80vh",children:"80vh"}),e.jsx(i,{value:"50vh",children:"50vh"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"××ש×ר ×× ×× ×ª×××"}),e.jsxs(C,{value:Y(t.verticalAlign),onValueChange:s=>a({verticalAlign:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××¢××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××¢×× (Start)"}),e.jsx(i,{value:"center",children:"×ר×× (Center)"}),e.jsx(i,{value:"end",children:"×××× (End)"}),e.jsx(i,{value:"stretch",children:"×ת××× (Stretch)"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"××××× ×¨×§×¢"}),e.jsx(m,{placeholder:"URL ××××××× (mp4)",value:t.bgVideo||"",onChange:s=>a({bgVideo:s.target.value}),className:"h-8 text-xs mt-1",dir:"ltr"}),t.bgVideo&&e.jsxs("div",{className:"flex items-center gap-4 mt-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(be,{checked:t.bgVideoLoop!==!1,onCheckedChange:s=>a({bgVideoLoop:s})}),e.jsx(g,{className:"text-[10px]",children:"××פ"})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(be,{checked:t.bgVideoMuted!==!1,onCheckedChange:s=>a({bgVideoMuted:s})}),e.jsx(g,{className:"text-[10px]",children:"××× ×©××¢"})]})]})]}),e.jsx("div",{children:e.jsx(m,{placeholder:"my-section",value:t.anchorId||"",onChange:s=>a({anchorId:s.target.value}),className:"h-8 text-xs mt-1",dir:"ltr"})}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"ר××× ×¡×§×©×"}),e.jsxs(C,{value:Y(t.sectionWidth),onValueChange:s=>a({sectionWidth:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"××× (100%)"}),e.jsx(i,{value:"boxed-960",children:"Boxed 960px"}),e.jsx(i,{value:"boxed-1140",children:"Boxed 1140px"}),e.jsx(i,{value:"boxed-1280",children:"Boxed 1280px"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"×××§×× (Position)"}),e.jsxs(C,{value:Y(t.position),onValueChange:s=>a({position:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"ר×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"ר××× (Static)"}),e.jsx(i,{value:"sticky",children:"××××§ (Sticky)"}),e.jsx(i,{value:"fixed",children:"×§×××¢ (Fixed)"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"Z-Index"}),e.jsx(m,{type:"number",value:t.zIndex||"",onChange:s=>a({zIndex:s.target.value}),className:"h-8 text-xs",placeholder:"×××××××",min:"0",max:"999"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"שק×פ×ת"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Re,{value:[parseInt(t.opacity||"100")],min:0,max:100,step:5,onValueChange:([s])=>a({opacity:String(s)}),className:"flex-1"}),e.jsxs("span",{className:"text-[10px] w-8",children:[t.opacity||100,"%"]})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"Overflow"}),e.jsxs(C,{value:Y(t.overflow),onValueChange:s=>a({overflow:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"ר×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"ר××× (Visible)"}),e.jsx(i,{value:"hidden",children:"××סתר (Hidden)"}),e.jsx(i,{value:"auto",children:"××××××× (Auto)"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"××¤×§× Hover"}),e.jsxs(C,{value:Y(t.hoverEffect),onValueChange:s=>a({hoverEffect:J(s)}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"×××"})}),e.jsxs(T,{children:[e.jsx(i,{value:K,children:"×××"}),e.jsx(i,{value:"scale",children:"××××× (Scale)"}),e.jsx(i,{value:"shadow",children:"×¦× ××ר××"}),e.jsx(i,{value:"brightness",children:"×××ר×ת"}
38),e.jsx(i,{value:"lift",children:"×ר×× (Lift)"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"CSS ××ת××"}),e.jsx(te,{placeholder:`/* CSS ××ת×× ××¡×§×©× */ 39color: red; 40background: #f00;`,value:t.customCSS||"",onChange:s=>a({customCSS:s.target.value}),rows:5,className:"text-xs font-mono mt-1",dir:"ltr"})]})]})]})})}function ct({style:t,onChange:a}){const[s,j]=D.useState("tablet"),d=t.responsiveOverrides||{},l=d[s]||{},r=n=>{const o={...d,[s]:{...l,...n}};a({responsiveOverrides:o})};return e.jsxs("div",{className:"border rounded-lg p-3 mb-3 bg-muted/30 space-y-3",dir:"rtl",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(g,{className:"text-xs font-semibold",children:"ער××× ×¨×¡×¤×× ×¡×××ת"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(_,{variant:s==="tablet"?"default":"outline",size:"icon",className:"h-7 w-7",onClick:()=>j("tablet"),children:e.jsx(Ee,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:s==="mobile"?"default":"outline",size:"icon",className:"h-7 w-7",onClick:()=>j("mobile"),children:e.jsx(ze,{className:"w-3.5 h-3.5"})})]})]}),e.jsxs("p",{className:"text-[10px] text-muted-foreground",children:["ש×× ×××× ××× ××××× ×¨×§ ×-",s==="tablet"?"×××××":"××××××"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(be,{checked:l.hidden||!1,onCheckedChange:n=>r({hidden:n})}),e.jsxs(g,{className:"text-[10px]",children:["×סתר ×-",s==="tablet"?"×××××":"××××××"]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×××× ×¤×× ×"}),e.jsxs(C,{value:l.fontSize||"__inherit__",onValueChange:n=>r({fontSize:n==="__inherit__"?void 0:n}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"××× ×סק××פ"})}),e.jsxs(T,{children:[e.jsx(i,{value:"__inherit__",children:"××× ×סק××פ"}),e.jsx(i,{value:"text-xs",children:"XS"}),e.jsx(i,{value:"text-sm",children:"×§××"}),e.jsx(i,{value:"text-base",children:"ר×××"}),e.jsx(i,{value:"text-lg",children:"××××"}),e.jsx(i,{value:"text-xl",children:"XL"}),e.jsx(i,{value:"text-2xl",children:"2XL"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"××ש×ר ×קס×"}),e.jsxs(C,{value:l.textAlign||"__inherit__",onValueChange:n=>r({textAlign:n==="__inherit__"?void 0:n}),children:[e.jsx(k,{className:"h-8 text-[10px]",children:e.jsx(S,{placeholder:"××× ×סק××פ"})}),e.jsxs(T,{children:[e.jsx(i,{value:"__inherit__",children:"××× ×סק××פ"}),e.jsx(i,{value:"text-right",children:"××××"}),e.jsx(i,{value:"text-center",children:"×ר××"}),e.jsx(i,{value:"text-left",children:"ש×××"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"Padding ×××¢×× (px)"}),e.jsx(m,{type:"number",value:l.paddingTop||"",placeholder:"××× ×סק××פ",onChange:n=>r({paddingTop:n.target.value||void 0}),className:"h-8 text-xs",min:"0"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"Padding ×××× (px)"}),e.jsx(m,{type:"number",value:l.paddingBottom||"",placeholder:"××× ×סק××פ",onChange:n=>r({paddingBottom:n.target.value||void 0}),className:"h-8 text-xs",min:"0"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"Padding ×××× (px)"}),e.jsx(m,{type:"number",value:l.paddingRight||"",placeholder:"××× ×סק××פ",onChange:n=>r({paddingRight:n.target.value||void 0}),className:"h-8 text-xs",min:"0"})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"Padding ש××× (px)"}),e.jsx(m,{type:"number",value:l.paddingLeft||"",placeholder:"××× ×סק××פ",onChange:n=>r({paddingLeft:n.target.value||void 0}),className:"h-8 text-xs",min:"0"})]})]})]})}const Ge="landing-media",rs=2,Qa=rs*1024*1024,qs=["image/jpeg","image/png","image/webp","image/gif","image/svg+xml"];function Ua({open:t,onOpenChange:a,onSelect:s}){const[j,d]=D.useState([]),[l,r]=D.useState(!1),[n,o]=D.useState(!1),[b,N]=D.useState(""),p=D.useCallback(async()=>{r(!0);const{data:L,error:E}=await ee.storage.from(Ge).list("",{limit:200,sortBy:{column:"created_at",order:"desc"}});E?console.error("Error listing media:",E):d(L||[]),r(!1)},[]);D.useEffect(()=>{t&&p()},[t,p]);const v=L=>{const{data:E}=ee.storage.from(Ge).getPublicUrl(L);return E.publicUrl},h=async L=>{const E=L.target.files;if(!(E!=null&&E.length))return;o(!0);let M=0;for(const G of Array.from(E)){if(!qs.includes(G.type)){V.error(`${G.name}: ס×× ×§×××¥ ×× × ×ª××`);continue}if(G.size>Qa){V.error(`${G.name}: ×××× ×קס×××× ${rs}MB`);continue}const z=G.name.split(".").pop(),Z=`${Date.now()}-${Math.random().toString(36).slice(2,8)}.${z}`,{error:w}=await ee.storage.from(Ge).upload(Z,G,{contentType:G.type});w?(V.error(`ש×××× ×××¢××ת ${G.name}`),console.error(w)):M++}M>0&&(V.success(`${M} ×§×צ×× ×××¢××`),p()),o(!1),L.target.value=""},I=async L=>{const{error:E}=await ee.storage.from(Ge).remove([L]);E?V.error("ש×××× ×××××§×"):(V.success("××§×××¥ × ×××§"),d(M=>M.filter(G=>
40G.name!==L)))},B=j.filter(L=>!b||L.name.toLowerCase().includes(b.toLowerCase()));return e.jsx(ns,{open:t,onOpenChange:a,children:e.jsxs(cs,{dir:"rtl",className:"sm:max-w-2xl max-h-[80vh] flex flex-col",children:[e.jsx(os,{children:e.jsxs(ds,{className:"flex items-center gap-2",children:[e.jsx(Fe,{className:"w-5 h-5"}),"ספר××ת ××××"]})}),e.jsxs(ms,{defaultValue:"library",className:"flex-1 flex flex-col min-h-0",children:[e.jsxs(us,{className:"grid w-full grid-cols-2",children:[e.jsx(me,{value:"library",children:"ספר×××"}),e.jsx(me,{value:"upload",children:"××¢×××"})]}),e.jsxs(ue,{value:"library",className:"flex-1 flex flex-col min-h-0 space-y-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(hs,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(m,{placeholder:"××פ×ש...",value:b,onChange:L=>N(L.target.value),className:"pr-9"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:l?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(es,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):B.length===0?e.jsx("div",{className:"text-center py-12 text-muted-foreground text-sm",children:j.length===0?"××× ×ª××× ×ת ×ספר×××. ××¢×× ×ª××× ×ת ××× ××ת×××.":"×× × ×צ×× ×ª×צ××ת"}):e.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 gap-2",children:B.map(L=>{const E=v(L.name);return e.jsxs("div",{className:"group relative aspect-square rounded-lg border overflow-hidden cursor-pointer hover:ring-2 hover:ring-primary transition-all bg-muted",onClick:()=>{s(E),a(!1)},children:[e.jsx("img",{src:E,alt:L.name,className:"w-full h-full object-cover",loading:"lazy"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-center justify-center opacity-0 group-hover:opacity-100",children:e.jsx("span",{className:"text-white text-xs font-medium",children:"××ר"})}),e.jsx("button",{onClick:M=>{M.stopPropagation(),I(L.name)},className:"absolute top-1 left-1 w-6 h-6 rounded bg-red-500/80 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-600",children:e.jsx(U,{className:"w-3 h-3"})})]},L.name)})})})]}),e.jsx(ue,{value:"upload",className:"space-y-4",children:e.jsxs("div",{className:"border-2 border-dashed rounded-xl p-8 text-center space-y-3",children:[e.jsx(Be,{className:"w-10 h-10 mx-auto text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"×ר×ר ת××× ×ת ×××× ×× ×××¥ ××××ר×"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["JPG, PNG, WebP, GIF, SVG â ×¢× ",rs,"MB ××§×××¥"]})]}),e.jsxs("label",{children:[e.jsx("input",{type:"file",accept:qs.join(","),multiple:!0,onChange:h,className:"hidden"}),e.jsx(_,{variant:"outline",size:"sm",asChild:!0,disabled:n,children:e.jsxs("span",{className:"cursor-pointer gap-2",children:[n?e.jsx(es,{className:"w-4 h-4 animate-spin"}):e.jsx(Be,{className:"w-4 h-4"}),n?"××¢××...":"××ר ×§×צ××"]})})]})]})})]})]})})}function ot({section:t,onUpdate:a}){const s=t.content||{},[j,d]=D.useState(!1);switch(t.type){case"hero":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"××תרת ר×ש×ת",value:s.title||"",onChange:l=>a({...s,title:l.target.value})}),e.jsx(m,{placeholder:"××תרת ××©× ×ת",value:s.subtitle||"",onChange:l=>a({...s,subtitle:l.target.value})}),e.jsx(m,{placeholder:"××§×¡× ×פת×ר",value:s.cta||"",onChange:l=>a({...s,cta:l.target.value})}),e.jsx(m,{placeholder:"URL רקע",value:s.bgImage||"",onChange:l=>a({...s,bgImage:l.target.value})})]});case"text":return e.jsx(te,{placeholder:"ת××× ×קס×",value:s.text||"",onChange:l=>a({...s,text:l.target.value}),rows:4});case"heading":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"××§×¡× ××תרת",value:s.text||"",onChange:l=>a({...s,text:l.target.value})}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs(C,{value:s.level||"h2",onValueChange:l=>a({...s,level:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"h1",children:"H1"}),e.jsx(i,{value:"h2",children:"H2"}),e.jsx(i,{value:"h3",children:"H3"}),e.jsx(i,{value:"h4",children:"H4"})]})]}),e.jsxs(C,{value:s.align||"center",onValueChange:l=>a({...s,align:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"right",children:"××××"}),e.jsx(i,{value:"center",children:"×ר××"}),e.jsx(i,{value:"left",children:"ש×××"})]})]})]})]});case"image":return e.jsxs("div",{className:"space-y-2",children:[s.src&&e.jsx("div",{className:"relative rounded-lg overflow-hidden border bg-muted aspect-video",children:e.jsx("img",{src:s.src,alt:s.alt||"",className:"w-full h-full object-contain"})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(_,{variant:"outline",size:"sm",className:"flex-1 gap-1.5 text-xs",onClick:()=>d(!0),children:[e.jsx(Fe,{className:"w-3.5 h-3.5"}),"ספר××ת ××××"]}),e.jsxs("label",{className:"flex-1",children:[e.jsx("input",{type:"file",accept:"image/jpeg,image/png,image/webp,image/gif,image/svg+xml",className:"hidden",onChange:async l=>{var p;
40const r=(p=l.target.files)==null?void 0:p[0];if(!r)return;if(r.size>2*1024*1024){V.error("×××× ×קס×××× 2MB");return}const n=r.name.split(".").pop(),o=`${Date.now()}-${Math.random().toString(36).slice(2,8)}.${n}`,{error:b}=await ee.storage.from("landing-media").upload(o,r,{contentType:r.type});if(b){V.error("ש×××× ×××¢×××");return}const{data:N}=ee.storage.from("landing-media").getPublicUrl(o);a({...s,src:N.publicUrl}),V.success("×ת××× × ×××¢×ת×"),l.target.value=""}}),e.jsx(_,{variant:"outline",size:"sm",className:"w-full gap-1.5 text-xs",asChild:!0,children:e.jsxs("span",{className:"cursor-pointer",children:[e.jsx(Be,{className:"w-3.5 h-3.5"}),"××¢×× ×ª××× ×"]})})]})]}),e.jsx(Ua,{open:j,onOpenChange:d,onSelect:l=>a({...s,src:l})}),e.jsx(m,{placeholder:"×× ××××§ URL ת××× ×",value:s.src||"",onChange:l=>a({...s,src:l.target.value}),dir:"ltr",className:"text-xs"}),e.jsx(m,{placeholder:"Alt text",value:s.alt||"",onChange:l=>a({...s,alt:l.target.value})}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"ר×××"}),e.jsxs(C,{value:s.width||"100%",onValueChange:l=>a({...s,width:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"100%",children:"×××"}),e.jsx(i,{value:"75%",children:"75%"}),e.jsx(i,{value:"50%",children:"50%"}),e.jsx(i,{value:"300px",children:"300px"}),e.jsx(i,{value:"200px",children:"200px"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"××ש×ר"}),e.jsxs(C,{value:s.align||"center",onValueChange:l=>a({...s,align:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"center",children:"×ר××"}),e.jsx(i,{value:"left",children:"ש×××"}),e.jsx(i,{value:"right",children:"××××"})]})]})]})]}),e.jsx(m,{placeholder:"×§×ש×ר (URL)",value:s.link||"",onChange:l=>a({...s,link:l.target.value}),dir:"ltr"}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×¢×××× ×¤×× ×ת (px)"}),e.jsx(Re,{value:[parseInt(s.borderRadius||"8")],min:0,max:50,step:2,onValueChange:([l])=>a({...s,borderRadius:String(l)})})]})]});case"form":{const l=s.formFields||(s.fields?s.fields.split(",").map((p,v)=>({id:`f${v}`,label:p.trim(),type:"text",required:!1})):[]),r=[{value:"text",label:"×קס×"},{value:"email",label:"××××××"},{value:"tel",label:"××פ××"},{value:"textarea",label:"××§×¡× ×ר××"},{value:"select",label:"××××¨× ×רש×××"},{value:"checkbox",label:"Checkbox"},{value:"radio",label:"××××¨× ××××× (Radio)"}],n=(p,v)=>{const h=[...l];h[p]={...h[p],...v},a({...s,formFields:h,fields:void 0})},o=()=>{const p=[...l,{id:`f${Date.now()}`,label:"",type:"text",required:!1}];a({...s,formFields:p,fields:void 0})},b=p=>{const v=l.filter((h,I)=>I!==p);a({...s,formFields:v,fields:void 0})},N=(p,v)=>{const h=[...l],I=p+v;I<0||I>=h.length||([h[p],h[I]]=[h[I],h[p]],a({...s,formFields:h,fields:void 0}))};return e.jsxs("div",{className:"space-y-3",children:[e.jsx(m,{placeholder:"××תרת ××פס",value:s.title||"",onChange:p=>a({...s,title:p.target.value})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{className:"text-[11px] font-semibold",children:"ש××ת ×××פס"}),l.map((p,v)=>e.jsxs("div",{className:"border border-white/10 rounded-lg p-2 space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{placeholder:"×©× ×ש××",value:p.label||"",onChange:h=>n(v,{label:h.target.value}),className:"h-7 text-xs flex-1"}),e.jsx("button",{onClick:()=>N(v,-1),className:"p-1 text-white/40 hover:text-white",title:"××× ×××¢××",children:"â"}),e.jsx("button",{onClick:()=>N(v,1),className:"p-1 text-white/40 hover:text-white",title:"××× ××××",children:"â"}),e.jsx("button",{onClick:()=>b(v),className:"p-1 text-red-400/60 hover:text-red-400",title:"×××§",children:e.jsx(U,{className:"w-3 h-3"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(C,{value:p.type||"text",onValueChange:h=>n(v,{type:h,options:h==="select"||h==="radio"?p.options||"×פשר×ת 1,×פשר×ת 2":void 0}),children:[e.jsx(k,{className:"h-7 text-[10px] flex-1",children:e.jsx(S,{})}),e.jsx(T,{children:r.map(h=>e.jsx(i,{value:h.value,children:h.label},h.value))})]}),e.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-white/60 whitespace-nowrap cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:p.required||!1,onChange:h=>n(v,{required:h.target.checked}),className:"w-3 h-3"}),"××××"]})]}),(p.type==="select"||p.type==="radio")&&e.jsx(m,{placeholder:"×פשר×××ת (××פר××ת ×פס××§××)",value:p.options||"",onChange:h=>n(v,{options:h.target.value}),className:"h-7 text-[10px]"}),p.type==="checkbox"&&e.jsx(m,{placeholder:"××§×¡× ×ס××× (××ש×: ××שר/ת ×§××ת ×¢×××× ××)",value:p.checkboxLabel||"",onChange:h=>n(v,{checkboxLabel:h.target.value}),className:"h-7 text-[10px]"}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-white/50 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:!!p.condition,onChange:h=>n(v,{condition:h.target.checked?{fieldId:"",value:""}:void 0}),className:"w-3 h-3"}),"××¦× ××ª× ××"]})}),p.condition&&e.jsxs("div",{className:"flex gap-1 items-center",children:[e.jsxs(C,{value:p.condition.fieldId||"",onValueChange:h=>n(v,{condition:{...p.condition,fieldId:h}}),children:[e.jsx(k,{className:"h-6 text-[10px] flex-1",children:e.jsx(S,{placeholder:"××ר ש××"})}),e.jsx(T,{children:l.filter((h,I)=>I!==v).map(h=>e.jsx(i,{value:h.id,children:h.label||"ש×× ××× ×©×"},h.id))})]}),e.jsx("span",{className:"text-[10px] text-white/40",children:"="}),e.jsx(m,{placeholder:"ער×",value:p.condition.value||"",onChange:h=>n(v,{condition:{...p.condition,value:h.target.value}}),className:"h-6 text-[10px] flex-1"})]})]},p.id||v)),e.jsxs(_,{variant:"outline",size:"sm",className:"w-full text-xs gap-1",onClick:o,children:[e.jsx(se,{className:"w-3 h-3"})," ××סף ש××"]})]}),e.jsx(m,{placeholder:"××§×¡× ×פת×ר ש××××",value:s.submitText||"",onChange:p=>a({...s,submitText:p.target.value})}),e.jsx(m,{placeholder:"×××עת ×צ×××",value:s.successMessage||"",onChange:p=>a({...s,successMessage:p.target.value})}),e.jsx(m,{placeholder:"Webhook URL (××פצ××× ××)",value:s.webhookUrl||"",onChange:p=>a({...s,webhookUrl:p.target.value}),dir:"ltr"}),e.jsx(m,{placeholder:"URL ××¤× ×× ×××ר ש××××",value:s.redirectUrl||"",onChange:p=>a({...s,redirectUrl:p.target.value}),dir:"ltr"}),e.jsx(m,{placeholder:"×××××× ××§××ת ×תר××ת",value:s.notifyEmail||"",onChange:p=>a({...s,notifyEmail:p.target.value}),dir:"ltr"})]})}case"columns":return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs(C,{value:String(s.columnCount||2),onValueChange:l=>a({...s,columnCount:parseInt(l)}
40),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"2",children:"2 ×¢××××ת"}),e.jsx(i,{value:"3",children:"3 ×¢××××ת"}),e.jsx(i,{value:"4",children:"4 ×¢××××ת"})]})]}),e.jsxs(C,{value:s.columnRatio||"equal",onValueChange:l=>a({...s,columnRatio:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"equal",children:"ש×××"}),e.jsx(i,{value:"60-40",children:"60/40"}),e.jsx(i,{value:"40-60",children:"40/60"}),e.jsx(i,{value:"70-30",children:"70/30"}),e.jsx(i,{value:"30-70",children:"30/70"}),(s.columnCount||2)>=3&&e.jsx(i,{value:"25-50-25",children:"25/50/25"}),(s.columnCount||2)>=3&&e.jsx(i,{value:"50-25-25",children:"50/25/25"})]})]})]}),Array.from({length:s.columnCount||2}).map((l,r)=>e.jsxs("div",{className:"border rounded p-2 space-y-1",children:[e.jsx(m,{placeholder:`××תרת ×¢×××× ${r+1}`,value:s[`col${r+1}Title`]||"",onChange:n=>a({...s,[`col${r+1}Title`]:n.target.value})}),e.jsx(m,{placeholder:`××§×¡× ×¢×××× ${r+1}`,value:s[`col${r+1}Text`]||"",onChange:n=>a({...s,[`col${r+1}Text`]:n.target.value})})]},r))]});case"cta":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"××תרת",value:s.title||"",onChange:l=>a({...s,title:l.target.value})}),e.jsx(m,{placeholder:"××§×¡× ×פת×ר",value:s.buttonText||"",onChange:l=>a({...s,buttonText:l.target.value})}),e.jsx(m,{placeholder:"×§×ש×ר",value:s.buttonUrl||"",onChange:l=>a({...s,buttonUrl:l.target.value})})]});case"button":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"××§×¡× ×פת×ר",value:s.text||"",onChange:l=>a({...s,text:l.target.value})}),e.jsx(m,{placeholder:"×§×ש×ר",value:s.url||"",onChange:l=>a({...s,url:l.target.value}),dir:"ltr"}),e.jsx(m,{placeholder:"××××§×× (×××××'×)",value:s.icon||"",onChange:l=>a({...s,icon:l.target.value})}),e.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[e.jsxs(C,{value:s.variant||"primary",onValueChange:l=>a({...s,variant:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"primary",children:"ר×ש×"}),e.jsx(i,{value:"secondary",children:"××©× ×"}),e.jsx(i,{value:"outline",children:"×ת×ר"}),e.jsx(i,{value:"gradient",children:"×ר×××× ×"})]})]}),e.jsxs(C,{value:s.size||"md",onValueChange:l=>a({...s,size:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"sm",children:"×§××"}),e.jsx(i,{value:"md",children:"××× ×× ×"}),e.jsx(i,{value:"lg",children:"××××"}),e.jsx(i,{value:"xl",children:"×¢× ×§"})]})]}),e.jsxs(C,{value:s.target||"_self",onValueChange:l=>a({...s,target:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"_self",children:"×××ª× ××××"}),e.jsx(i,{value:"_blank",children:"×××× ××ש"})]})]})]})]});case"divider":return e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs(C,{value:s.style||"solid",onValueChange:l=>a({...s,style:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"solid",children:"רצ××£"}),e.jsx(i,{value:"dashed",children:"××§×××§×"}),e.jsx(i,{value:"dotted",children:"× ×§×××ת"}),e.jsx(i,{value:"double",children:"×פ××"})]})]}),e.jsxs(C,{value:s.thickness||"1",onValueChange:l=>a({...s,thickness:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"1",children:"××§"}),e.jsx(i,{value:"2",children:"××× ×× ×"}),e.jsx(i,{value:"4",children:"×¢××"})]})]})]});case"spacer":return e.jsxs(C,{value:s.height||"40",onValueChange:l=>a({...s,height:l}),children:[e.jsx(k,{className:"w-40",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"20",children:"×§×× (20px)"}),e.jsx(i,{value:"40",children:"××× ×× × (40px)"}),e.jsx(i,{value:"60",children:"×××× (60px)"}),e.jsx(i,{value:"100",children:"×¢× ×§ (100px)"})]})]});case"icon-box":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"×××××'× / ××××§××",value:s.icon||"",onChange:l=>a({...s,icon:l.target.value})}),e.jsx(m,{placeholder:"××תרת",value:s.title||"",onChange:l=>a({...s,title:l.target.value})}),e.jsx(te,{placeholder:"ת×××ר",value:s.description||"",onChange:l=>a({...s,description:l.target.value}),rows:2})]});case"video":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"URL ××××× (YouTube / Vimeo / MP4)",value:s.url||"",onChange:l=>a({...s,url:l.target.value}),dir:"ltr"}),e.jsxs(C,{value:s.type||"youtube",onValueChange:l=>a({...s,type:l}),children:[e.jsx(k,{className:"w-40",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"youtube",children:"YouTube"}),e.jsx(i,{value:"vimeo",children:"Vimeo"}),e.jsx(i,{value:"mp4",children:"MP4"})]})]})]});case"countdown":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"××תרת",value:s.title||"",onChange:l=>a({...s,title:l.target.value})}),e.jsx(m,{type:"datetime-local",value:s.targetDate||"",onChange:l=>a({...s,targetDate:l.target.value}),dir:"ltr"})]});case"quote":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(te,{placeholder:"××§×¡× ×צ××××",value:s.text||"",onChange:l=>a({...s,text:l.target.value}),rows:3}),e.jsx(m,{placeholder:"×××ר",value:s.author||"",onChange:l=>a({...s,author:l.target.value})}),e.jsx(m,{placeholder:"תפק××",value:s.role||"",onChange:l=>a({...s,role:l.target.value})})]});case"contact-info":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"××פ××",value:s.phone||"",onChange:l=>a({...s,phone:l.target.value})}),e.jsx(m,{placeholder:"××××××",value:s.email||"",onChange:l=>a({...s,email:l.target.value})}),e.jsx(m,{placeholder:"×ת××ת",value:s.address||"",onChange:l=>a({...s,address:l.target.value})}),e.jsx(m,{placeholder:"WhatsApp",value:s.whatsapp||"",onChange:l=>a({...s,whatsapp:l.target.value})})]});case"opening-hours":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"××תרת",value:s.title||"",onChange:l=>a({...s,title:l.target.value})}),e.jsx(ge,{items:s.items||[],fields:["day","hours"],labels:["×××","שע×ת"],onChange:l=>a({...s,items:l})})]});case"social-icons":return e.jsxs("div",{className:"space-y-2",children:[(s.items||[]).map((l,r)=>e.jsxs("div",{className:"flex gap-1",children:[e.jsxs(C,{value:l.platform||"facebook",onValueChange:n=>{const o=[...s.items||[]];o[r]={...o[r],platform:n},a({...s,items:o})},children:[e.jsx(k,{className:"w-28",children:e.jsx(S,{})}),e.jsx(T,{children:["facebook","instagram","twitter","linkedin","youtube","tiktok","whatsapp","telegram"].map(n=>e.jsx(i,{value:n,children:n},n))})]}),e.jsx(m,{placeholder:"URL",value:l.url||"",onChange:n=>{const o=[...s.items||[]];o[r]={...o[r],url:n.target.value},a({...s,items:o})},dir:"ltr",className:"flex-1"}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-9 w-9 shrink-0",onClick:()=>{const n=(s.items||[]).filter((o,b)=>b!==r);a({...s,items:n.length?n:[{platform:"facebook",url:""}]})},children:e.jsx(U,{className:"w-3 h-3"})})]},r)),e.jsxs(_,{variant:"outline",size:"sm",className:"gap-1",onClick:()=>a({...s,items:[...s.items||[],{platform:"facebook",url:""}]}),children:[e.jsx(se,{className:"w-3 h-3"})," ××סף רשת"]})]});case"pricing":return e.jsxs("div",{className:"space-y-2",children:[(s.items||[]).map((l,r)=>e.jsxs("div",{className:"border rounded p-2 space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["ת××× ×ת #",r+1]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(g,{className:"text-[10px]",children:"××××ש"}),e.jsx(be,{checked:l.highlighted||!1,onCheckedChange:n=>{const o=[...s.items];o[r]={...o[r],highlighted:n},a({...s,items:o})}}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{const n=s.items.filter((o,b)=>b!==r);a({...s,items:n})},children:e.jsx(U,{className:"w-3 h-3"})})]})]}),e.jsx(m,{placeholder:"×©× ×ª××× ×ת",value:l.name||"",onChange:n=>{const o=[...s.items];o[r]={...o[r],name:n.target.value},a({...s,items:o})}}),e.jsxs("div",{className:"grid grid-cols-2 gap-1",children:[e.jsx(m,{placeholder:"×××ר",value:l.price||"",onChange:n=>{const o=[...s.items];o[r]={...o[r],price:n.target.value},a({...s,items:o})}}),e.jsx(m,{placeholder:"תק×פ×",value:l.period||"",onChange:n=>{const o=[...s.items];o[r]={...o[r],period:n.target.value},a({...s,items:o})}})]}),e.jsx(te,{placeholder:"ת××× ×ת (ש××¨× ××× ×ª××× ×)",value:(l.features||[]).join(` 41`),onChange:n=>{const o=[...s.items];o[r]={...o[r],features:n.target.value.split(` 42`)},a({...s,items:o})},rows:3}),e.jsx(m,{placeholder:"××§×¡× ×פת×ר",value:l.cta||"",onChange:n=>{const o=[...s.items];o[r]={...o[r],cta:n.target.value},a({...s,items:o})}})]},r)),e.jsxs(_,{variant:"outline",size:"sm",className:"gap-1",onClick:()=>a({...s,items:[...s.items||[],{name:"",price:"",period:"/×××ש",features:[],cta:"×ת××",highlighted:!1}]}),children:[e.jsx(se,{className:"w-3 h-3"})," ××סף ת××× ×ת"]})]});case"counter":return e.jsx(ge,{items:s.items||[],fields:["number","label","suffix"],labels:["×ספר","ת×××ת","ס×××ת"],onChange:l=>a({...s,items:l})});case"progress-bar":return e.jsxs("div",{className:"space-y-2",children:[(s.items||[]).map((l,r)=>e.jsxs("div",{className:"border rounded p-2 space-y-1",children:[e.jsxs("div",{className:"flex gap-1",children:[e.jsx(m,{placeholder:"ת×××ת",value:l.label||"",onChange:n=>{const o=[...s.items||[]];o[r]={...o[r],label:n.target.value},a({...s,items:o})},className:"flex-1"}),e.jsxs("span",{className:"text-xs self-center w-10 text-center",children:[l.value||0,"%"]}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-9 w-9 shrink-0",onClick:()=>{const n=(s.items||[]).filter((o,b)=>b!==r);a({...s,items:n})},children:e.jsx(U,{className:"w-3 h-3"})})]}),e.jsx(Re,{value:[l.value||0],min:0,max:100,step:5,onValueChange:([n])=>{const o=[...s.items||[]];o[r]={...o[r],value:n},a({...s,items:o})}})]},r)),e.jsxs(_,{variant:"outline",size:"sm",className:"gap-1",onClick:()=>a({...s,items:[...s.items||[],{label:"",value:50}]}),children:[e.jsx(se,{className:"w-3 h-3"})," ××סף ××"]})]});case"gallery":return e.jsxs("div",{className:"space-y-2",children:[e.jsxs(C,{value:String(s.columns||3),onValueChange:l=>a({...s,columns:parseInt(l)}
42),children:[e.jsx(k,{className:"w-32",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"2",children:"2 ×¢××××ת"}),e.jsx(i,{value:"3",children:"3 ×¢××××ת"}),e.jsx(i,{value:"4",children:"4 ×¢××××ת"})]})]}),e.jsx(ge,{items:s.items||[],fields:["src","alt"],labels:["URL ת××× ×","Alt"],onChange:l=>a({...s,items:l})})]});case"logo-carousel":return e.jsx(ge,{items:s.items||[],fields:["src","name"],labels:["URL ××××","ש×"],onChange:l=>a({...s,items:l})});case"tabs":return e.jsx(ge,{items:s.items||[],fields:["label","content"],labels:["×©× ×××","ת×××"],onChange:l=>a({...s,items:l})});case"team":return e.jsx(ge,{items:s.items||[],fields:["name","role","image","bio"],labels:["ש×","תפק××","URL ת××× ×","×××"],onChange:l=>a({...s,items:l})});case"testimonials":return e.jsx(ge,{items:s.items||[],fields:["name","role","text"],labels:["ש×","תפק××","×××צ×"],onChange:l=>a({...s,items:l})});case"faq":return e.jsx(ge,{items:s.items||[],fields:["question","answer"],labels:["ש×××","תש×××"],onChange:l=>a({...s,items:l})});case"features":return e.jsx(ge,{items:s.items||[],fields:["icon","title","description"],labels:["×××××'×","××תרת","ת×××ר"],onChange:l=>a({...s,items:l})});case"list":return e.jsxs("div",{className:"space-y-2",children:[e.jsxs(C,{value:s.style||"bullet",onValueChange:l=>a({...s,style:l}),children:[e.jsx(k,{className:"w-40",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"bullet",children:"ת××××××"}),e.jsx(i,{value:"number",children:"×ספר××"}),e.jsx(i,{value:"check",children:"â ××"}),e.jsx(i,{value:"arrow",children:"â ××¥"})]})]}),(s.items||[""]).map((l,r)=>e.jsxs("div",{className:"flex gap-1",children:[e.jsx(m,{value:l,onChange:n=>{const o=[...s.items||[""]];o[r]=n.target.value,a({...s,items:o})},placeholder:`פר×× ${r+1}`}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-9 w-9 shrink-0",onClick:()=>{const n=(s.items||[""]).filter((o,b)=>b!==r);a({...s,items:n.length?n:[""]})},children:e.jsx(U,{className:"w-3 h-3"})})]},r)),e.jsxs(_,{variant:"outline",size:"sm",className:"gap-1",onClick:()=>a({...s,items:[...s.items||[""],""]}),children:[e.jsx(se,{className:"w-3 h-3"})," ××סף פר××"]})]});case"map":return e.jsx("div",{className:"space-y-2",children:e.jsx(m,{placeholder:"×ת××ת ×× ×§×××ר××× ××ת",value:s.address||"",onChange:l=>a({...s,address:l.target.value})})});case"html-embed":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{className:"text-[10px]",children:"×§×× HTML"}),e.jsx(te,{placeholder:"<div>HTML ××ת××</div>",value:s.html||"",onChange:l=>a({...s,html:l.target.value}),rows:6,className:"font-mono text-xs",dir:"ltr"})]});case"accordion":return e.jsxs("div",{className:"space-y-2",children:[(s.items||[]).map((l,r)=>e.jsxs("div",{className:"border rounded p-2 space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["#",r+1]}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{const n=(s.items||[]).filter((o,b)=>b!==r);a({...s,items:n.length?n:[{title:"",content:""}]})},children:e.jsx(U,{className:"w-3 h-3"})})]}),e.jsx(m,{placeholder:"××תרת",value:l.title||"",onChange:n=>{const o=[...s.items||[]];o[r]={...o[r],title:n.target.value},a({...s,items:o})}}),e.jsx(te,{placeholder:"ת×××",value:l.content||"",onChange:n=>{const o=[...s.items||[]];o[r]={...o[r],content:n.target.value},a({...s,items:o})},rows:2})]},r)),e.jsxs(_,{variant:"outline",size:"sm",className:"gap-1",onClick:()=>a({...s,items:[...s.items||[],{title:"",content:""}]}),children:[e.jsx(se,{className:"w-3 h-3"})," ××סף פר××"]})]});case"star-rating":return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"××ר××"}),e.jsx(Re,{value:[s.rating||4],min:0,max:s.maxStars||5,step:1,onValueChange:([l])=>a({...s,rating:l})})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"×××××× ×קס"}),e.jsxs(C,{value:String(s.maxStars||5),onValueChange:l=>a({...s,maxStars:parseInt(l)}
42),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"5",children:"5"}),e.jsx(i,{value:"10",children:"10"})]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"××××"}),e.jsxs(C,{value:s.size||"lg",onValueChange:l=>a({...s,size:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"sm",children:"×§××"}),e.jsx(i,{value:"lg",children:"ר×××"}),e.jsx(i,{value:"xl",children:"××××"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"צ××¢"}),e.jsx(m,{type:"color",value:s.color||"#f59e0b",onChange:l=>a({...s,color:l.target.value}),className:"h-8"})]})]}),e.jsx(m,{placeholder:"ת×××ת (××פצ××× ××)",value:s.label||"",onChange:l=>a({...s,label:l.target.value})})]});case"alert-box":return e.jsxs("div",{className:"space-y-2",children:[e.jsxs(C,{value:s.type||"info",onValueChange:l=>a({...s,type:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"info",children:"××××¢"}),e.jsx(i,{value:"success",children:"×צ×××"}),e.jsx(i,{value:"warning",children:"×××ר×"}),e.jsx(i,{value:"error",children:"ש××××"})]})]}),e.jsx(m,{placeholder:"××תרת",value:s.title||"",onChange:l=>a({...s,title:l.target.value})}),e.jsx(te,{placeholder:"ת××× ××תר××",value:s.text||"",onChange:l=>a({...s,text:l.target.value}),rows:2})]});case"toggle":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"××תרת",value:s.title||"",onChange:l=>a({...s,title:l.target.value})}),e.jsx(te,{placeholder:"ת××× ××סתר",value:s.content||"",onChange:l=>a({...s,content:l.target.value}),rows:3}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(be,{checked:s.defaultOpen||!1,onCheckedChange:l=>a({...s,defaultOpen:l})}),e.jsx(g,{className:"text-[10px]",children:"פת×× ××ר×רת ××××"})]})]});case"inner-section":return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs(C,{value:String(s.columnCount||2),onValueChange:l=>{const r=parseInt(l),n=Array.from({length:r},(o,b)=>{var N;return((N=s.columns)==null?void 0:N[b])||{widgets:[]}});a({...s,columnCount:r,columns:n})},children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"2",children:"2 ×¢××××ת"}),e.jsx(i,{value:"3",children:"3 ×¢××××ת"}),e.jsx(i,{value:"4",children:"4 ×¢××××ת"})]})]}),e.jsxs(C,{value:s.columnRatio||"equal",onValueChange:l=>a({...s,columnRatio:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"equal",children:"ש×××"}),e.jsx(i,{value:"60-40",children:"60/40"}),e.jsx(i,{value:"40-60",children:"40/60"}),e.jsx(i,{value:"70-30",children:"70/30"}),e.jsx(i,{value:"30-70",children:"30/70"})]})]})]}),(s.columns||[]).map((l,r)=>e.jsxs("div",{className:"border rounded p-2 space-y-1",children:[e.jsxs(g,{className:"text-[10px] font-semibold",children:["×¢×××× ",r+1]}),(l.widgets||[]).map((n,o)=>e.jsxs("div",{className:"flex gap-1",children:[e.jsxs(C,{value:n.type||"text",onValueChange:b=>{const N=[...s.columns||[]];N[r]={...N[r],widgets:N[r].widgets.map((p,v)=>v===o?{...p,type:b}:p)},a({...s,columns:N})},children:[e.jsx(k,{className:"w-24 h-7 text-[10px]",children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"text",children:"×קס×"}),e.jsx(i,{value:"heading",children:"××תרת"}),e.jsx(i,{value:"image",children:"ת××× ×"}),e.jsx(i,{value:"button",children:"×פת×ר"}),e.jsx(i,{value:"icon-box",children:"××××§××"})]})]}),e.jsx(m,{placeholder:"ת×××",value:n.content||"",onChange:b=>{const N=[...s.columns||[]];N[r]={...N[r],widgets:N[r].widgets.map((p,v)=>v===o?{...p,content:b.target.value}:p)},a({...s,columns:N})},className:"flex-1 h-7 text-xs"}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:()=>{const b=[...s.columns||[]];b[r]={...b[r],widgets:b[r].widgets.filter((N,p)=>p!==o)},a({...s,columns:b})},children:e.jsx(U,{className:"w-3 h-3"})})]},o)),e.jsxs(_,{variant:"outline",size:"sm",className:"h-6 text-[10px] gap-1",onClick:()=>{const n=[...s.columns||[]];n[r]={...n[r],widgets:[...n[r].widgets||[],{type:"text",content:""}]},a({...s,columns:n})},children:[e.jsx(se,{className:"w-3 h-3"})," ××סף ×××××'×"]})]},r))]});case"scroll-to-top":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"×קס×/××××§××",value:s.text||"â",onCh
42ange:l=>a({...s,text:l.target.value})}),e.jsxs("div",{children:[e.jsx(g,{className:"text-[10px]",children:"××¦× ×××¨× ××××× (px)"}),e.jsx(m,{type:"number",value:s.showAfter||300,onChange:l=>a({...s,showAfter:parseInt(l.target.value)}),className:"h-8 text-xs"})]}),e.jsxs(C,{value:s.position||"bottom-right",onValueChange:l=>a({...s,position:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"bottom-right",children:"×××× ××××"}),e.jsx(i,{value:"bottom-left",children:"ש××× ××××"})]})]})]});case"lottie":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"URL ××§×××¥ Lottie JSON",value:s.url||"",onChange:l=>a({...s,url:l.target.value}),dir:"ltr"}),e.jsx(m,{placeholder:"ר××× (px)",value:s.width||"200px",onChange:l=>a({...s,width:l.target.value}),dir:"ltr"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(be,{checked:s.loop!==!1,onCheckedChange:l=>a({...s,loop:l})}),e.jsx(g,{className:"text-[10px]",children:"××פ"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(be,{checked:s.autoplay!==!1,onCheckedChange:l=>a({...s,autoplay:l})}),e.jsx(g,{className:"text-[10px]",children:"×פע×× ×××××××ת"})]})]})]});case"table-of-contents":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{placeholder:"××תרת",value:s.title||"ת××× ×¢× ××× ××",onChange:l=>a({...s,title:l.target.value})}),e.jsxs(C,{value:s.style||"numbered",onValueChange:l=>a({...s,style:l}),children:[e.jsx(k,{children:e.jsx(S,{})}),e.jsxs(T,{children:[e.jsx(i,{value:"numbered",children:"×××ספר"}),e.jsx(i,{value:"bullet",children:"ת××××××"}),e.jsx(i,{value:"plain",children:"פש××"})]})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"× ×צר ×××××××ת ×××תר×ת (Heading) ×××£"})]});default:return e.jsx("p",{className:"text-xs text-muted-foreground",children:"××× ×¢××¨× ××¡×§×©× ××"})}}function ge({items:t,fields:a,labels:s,onChange:j}){const d=()=>{const n={};a.forEach(o=>n[o]=""),j([...t,n])},l=n=>{const o=t.filter((b,N)=>N!==n);j(o.length?o:[(()=>{const b={};return a.forEach(N=>b[N]=""),b})()])},r=(n,o,b)=>{const N=[...t];N[n]={...N[n],[o]:b},j(N)};return e.jsxs("div",{className:"space-y-2",children:[t.map((n,o)=>e.jsxs("div",{className:"border rounded p-2 space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["#",o+1]}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>l(o),children:e.jsx(U,{className:"w-3 h-3"})})]}),a.map((b,N)=>e.jsx(m,{placeholder:s[N],value:n[b]||"",onChange:p=>r(o,b,p.target.value)},b))]},o)),e.jsxs(_,{variant:"outline",size:"sm",className:"gap-1",onClick:d,children:[e.jsx(se,{className:"w-3 h-3"})," ××סף"]})]})}function el({section:t,index:a,totalSections:s,onBack:j,onUpdate:d,onUpdateStyle:l,onUpdateSection:r,onRemove:n,onDuplicate:o,onMoveUp:b,onMoveDown:N,onGenerateAI:p,isGenerating:v}){var G;const h=je.find(z=>z.type===t.type),I=(h==null?void 0:h.icon)||je[0].icon,B=t.label||(h==null?void 0:h.label)||t.type,[L,E]=D.useState(!1),M=t.hideOn||[];return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsx("div",{className:"px-3 pt-2 pb-1 shrink-0",children:e.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-white/40",children:[e.jsx("button",{onClick:j,className:"hover:text-white/70 transition-colors",children:"××£"}),e.jsx(Le,{className:"w-2.5 h-2.5 rotate-180"}),e.jsx("span",{className:"text-white/60 truncate max-w-[120px]",children:(h==null?void 0:h.label)||t.type}),t.label&&t.label!==(h==null?void 0:h.label)&&e.jsxs(e.Fragment,{children:[e.jsx(Le,{className:"w-2.5 h-2.5 rotate-180"}),e.jsx("span",{className:"text-white/80 truncate max-w-[100px]",children:t.label})]})]})}),e.jsxs("div",{className:"px-3 py-2 border-b border-white/10 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("button",{onClick:j,className:"p-1 rounded hover:bg-white/10 transition-colors",children:e.jsx(Le,{className:"w-4 h-4 text-white/50"})}),e.jsx(I,{className:"w-4 h-4 text-white/60"}),L?e.jsx(m,{autoFocus:!0,className:"h-6 w-32 text-xs bg-white/5 border-white/10 text-white",value:t.label||"",placeholder:(h==null?void 0:h.label)||t.type,onCh
42ange:z=>r({label:z.target.value}),onBlur:()=>E(!1),onKeyDown:z=>z.key==="Enter"&&E(!1)}):e.jsx("span",{className:"text-sm font-medium text-white/90 cursor-pointer hover:text-white",onDoubleClick:()=>E(!0),title:"××××¦× ×פ××× ×ש×× ×× ×©×",children:B}),t.isGlobal&&e.jsx(pe,{className:"text-[9px] bg-purple-500/30 text-purple-300 border-purple-500/30",children:"××××××"})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 text-white/40 hover:text-white hover:bg-white/10",onClick:b,disabled:a===0,title:"××× ×××¢××",children:e.jsx(Js,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 text-white/40 hover:text-white hover:bg-white/10",onClick:N,disabled:a>=s-1,title:"××× ××××",children:e.jsx(st,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 text-white/40 hover:text-white hover:bg-white/10",onClick:o,title:"ש×פ×",children:e.jsx(Ve,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 text-white/40 hover:text-white hover:bg-white/10",onClick:p,disabled:v,title:"AI ת×××",children:e.jsx(Ye,{className:`w-3.5 h-3.5 ${v?"animate-spin":""}`})}),e.jsx(_,{variant:"ghost",size:"icon",className:`h-7 w-7 hover:bg-white/10 ${t.isGlobal?"text-purple-400":"text-white/40 hover:text-white"}`,onClick:()=>r({isGlobal:!t.isGlobal,globalId:t.isGlobal?void 0:t.id}),title:"××××××",children:e.jsx(xs,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 text-white/40 hover:text-white hover:bg-white/10",onClick:()=>r({hidden:!t.hidden}),title:t.hidden?"×צ×":"×סתר",children:t.hidden?e.jsx(Je,{className:"w-3.5 h-3.5"}):e.jsx(Me,{className:"w-3.5 h-3.5"})}),e.jsx("div",{className:"flex-1"}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 text-red-400/60 hover:text-red-400 hover:bg-red-500/10",onClick:n,title:"×××§",children:e.jsx(U,{className:"w-3.5 h-3.5"})})]})]}),e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsxs(ms,{defaultValue:"content",dir:"rtl",className:"h-full flex flex-col",children:[e.jsxs(us,{className:"w-full grid grid-cols-3 h-9 rounded-none bg-white/5 border-b border-white/10 shrink-0",children:[e.jsx(me,{value:"content",className:"text-[11px] text-white/60 data-[state=active]:text-white data-[state=active]:bg-white/10 rounded-none",children:"ת×××"}),e.jsx(me,{value:"style",className:"text-[11px] text-white/60 data-[state=active]:text-white data-[state=active]:bg-white/10 rounded-none",children:"ס×× ××"}),e.jsx(me,{value:"advanced",className:"text-[11px] text-white/60 data-[state=active]:text-white data-[state=active]:bg-white/10 rounded-none",children:"×תק××"})]}),e.jsx(ue,{value:"content",className:"flex-1 p-3 mt-0 overflow-auto",children:e.jsx("div",{className:"[&_input]:bg-white/5 [&_input]:border-white/10 [&_input]:text-white [&_textarea]:bg-white/5 [&_textarea]:border-white/10 [&_textarea]:text-white [&_label]:text-white/60 [&_select]:bg-white/5 [&_button[role=combobox]]:bg-white/5 [&_button[role=combobox]]:border-white/10 [&_button[role=combobox]]:text-white/70",children:e.jsx(ot,{section:t,onUpdate:d})})}),e.jsx(ue,{value:"style",className:"flex-1 p-3 mt-0 overflow-auto",children:e.jsx("div",{className:"[&_input]:bg-white/5 [&_input]:border-white/10 [&_input]:text-white [&_textarea]:bg-white/5 [&_textarea]:border-white/10 [&_textarea]:text-white [&_label]:text-white/60 [&_select]:bg-white/5 [&_button[role=combobox]]:bg-white/5 [&_button[role=combobox]]:border-white/10 [&_button[role=combobox]]:text-white/70 [&_.border]:border-white/10 [&_.bg-muted\\\\/30]:bg-white/5",children:e.jsx(nt,{style:t.style||{},onChange:l})})}),e.jsxs(ue,{value:"advanced",className:"flex-1 p-3 mt-0 overflow-auto space-y-4",children:[e.jsx("div",{className:"[&_input]:bg-white/5 [&_input]:border-white/10 [&_input]:text-white [&_label]:text-white/60 [&_select]:bg-white/5 [&_button[role=combobox]]:bg-white/5 [&_button[role=combobox]]:border-white/10 [&_button[role=combobox]]:text-white/70 [&_.border]:border-white/10 [&_.bg-muted\\\\/30]:bg-white/5",children:e.jsx(ct,{style:t.style||{},onChange:l})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{className:"text-[11px] font-semibold text-white/50",children:"×סתר ×××ש×ר××"}),e.jsxs(et,{type:"multiple",value:M,onValueChange:z=>r({hideOn:z}),className:"justify-start",children:[e.jsxs(Pe,{value:"desktop",className:"h-7 text-[10px] gap-1 text-white/50 data-[state=on]:bg-white/15 data-[state=on]:text-white border-white/10",children:[e.jsx(Ze,{className:"w-3 h-3"})," ×סק××פ"]}),e.jsxs(Pe,{value:"tablet",className:"h-7 text-[10px] gap-1 text-white/50 data-[state=on]:bg-white/15 data-[state=on]:text-white border-white/10",children:[e.jsx(Ee,{className:"w-3 h-3"})," ×××××"]}),e.jsxs(Pe,{value:"mobile",className:"h-7 text-[10px] gap-1 text-white/50 data-[state=on]:bg-white/15 data-[state=on]:text-white border-white/10",children:[e.jsx(ze,{className:"w-3 h-3"})," ××××××"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{className:"text-[11px] font-semibold text-white/50",children:"CSS ××ת××"}),e.jsx(te,{placeholder:`color: red; 43background: #f0f0f0;`,value:t.customCSS||"",onChange:z=>r({customCSS:z.target.value}),rows:5,className:"text-xs font-mono bg-white/5 border-white/10 text-white",dir:"ltr"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{className:"text-[11px] font-semibold text-white/50",children:"Anchor ID"}),e.jsx(m,{placeholder:"my-section",value:((G=t.style)==null?void 0:G.anchorId)||"",onChange:z=>l({anchorId:z.target.value}),className:"h-8 text-xs bg-white/5 border-white/10 text-white",dir:"ltr"})]})]})]})})]})}function sl(){const{t}=ve(),a=[{keys:"Ctrl + Z",label:t("shortcuts.undo")},{keys:"Ctrl + Shift + Z",label:t("shortcuts.redo")},{keys:"Ctrl + Y",label:t("shortcuts.redo")},{keys:"Ctrl + C",label:t("shortcuts.copy")},{keys:"Ctrl + V",label:t("shortcuts.paste")},{keys:"Delete",label:t("shortcuts.delete")},{keys:t("shortcuts.rightClick"),label:t("shortcuts.contextMenu")},{keys:t("shortcuts.doubleClick"),label:t("shortcuts.doubleClick")}];return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white/60",children:[e.jsx(Qs,{className:"w-4 h-4"}),e.jsx("span",{className:"text-xs font-medium",children:t("shortcuts.title")})]}),e.jsx("div",{className:"space-y-1",children:a.map((s,j)=>e.jsxs("div",{className:"flex items-center justify-between py-1.5 px-2 rounded hover:bg-white/5",children:[e.jsx("span",{className:"text-[11px] text-white/60",children:s.label}),e.jsx("kbd",{className:"text-[10px] text-white/40 bg-white/10 px-2 py-0.5 rounded font-mono",children:s.keys})]},j))})]})}function tl({section:t,index:a,isSelected:s,onSelect:j,onUpdate:d,onUp
43dateStyle:l,onUpdateSection:r,onRemove:n,onDuplicate:o,onGenerateAI:b,isGenerating:N}){const{attributes:p,listeners:v,setNodeRef:h,transform:I,transition:B,isDragging:L}=Yt({id:t.id}),[E,M]=D.useState(!1),[G,z]=D.useState(!1),[Z,w]=D.useState(!1),[H,W]=D.useState(!0),[ae,le]=D.useState(!1),Q=je.find(O=>O.type===t.type),fe=(Q==null?void 0:Q.icon)||je[0].icon,ie=t.label||(Q==null?void 0:Q.label)||t.type,R={transform:Jt.Transform.toString(I),transition:B,opacity:L?.5:1,zIndex:L?50:void 0},q=t.hideOn||[];return e.jsx("div",{ref:h,style:R,onClick:j,id:`section-editor-${t.id}`,children:e.jsx(We,{className:`group transition-all ${L?"ring-2 ring-primary shadow-xl":""} ${s?"ring-2 ring-primary/60 bg-primary/5":""} ${t.hidden?"opacity-50":""}`,children:e.jsx(qe,{className:"p-0",children:e.jsxs(ka,{open:H,onOpenChange:W,children:[e.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-transparent hover:border-border",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{...p,...v,className:"cursor-grab active:cursor-grabbing p-1 rounded hover:bg-muted",tabIndex:-1,children:e.jsx(fs,{className:"w-4 h-4 text-muted-foreground"})}),e.jsx(fe,{className:"w-4 h-4 text-muted-foreground"}),ae?e.jsx(m,{autoFocus:!0,className:"h-6 w-28 text-xs",value:t.label||"",placeholder:(Q==null?void 0:Q.label)||t.type,onChange:O=>r({label:O.target.value}),onBlur:()=>le(!1),onKeyDown:O=>O.key==="Enter"&&le(!1),onClick:O=>O.stopPropagation()}):e.jsx("span",{className:"text-sm font-medium cursor-pointer",onDoubleClick:()=>le(!0),title:"××××¦× ×פ××× ×ש×× ×× ×©×",children:ie}),e.jsxs(pe,{variant:"outline",className:"text-[10px]",children:["#",a+1]}),t.hidden&&e.jsx(pe,{variant:"secondary",className:"text-[10px]",children:"××סתר"}),t.isGlobal&&e.jsx(pe,{variant:"default",className:"text-[10px] bg-purple-500",children:"××××××"}),q.length>0&&e.jsxs(pe,{variant:"outline",className:"text-[10px] gap-0.5",children:[q.includes("mobile")&&e.jsx(ze,{className:"w-2.5 h-2.5"}),q.includes("tablet")&&e.jsx(Ee,{className:"w-2.5 h-2.5"}),q.includes("desktop")&&e.jsx(Ze,{className:"w-2.5 h-2.5"})]})]}),e.jsxs("div",{className:"flex gap-0.5",children:[e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:O=>{O.stopPropagation(),b()},disabled:N,title:"×צ×רת ת××× AI",children:e.jsx(Ye,{className:`w-3.5 h-3.5 ${N?"animate-spin":""}`})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:O=>{O.stopPropagation(),M(!E)},title:"ער××ת ס×× ××",children:e.jsx(is,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:O=>{O.stopPropagation(),z(!G)},title:"CSS ××ת××",children:e.jsx(Us,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:O=>{O.stopPropagation(),w(!Z)},title:"ער××× ×¨×¡×¤×× ×¡×××ת",children:e.jsx(at,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:`h-7 w-7 ${t.isGlobal?"text-purple-500":""}`,onClick:O=>{O.stopPropagation(),r({isGlobal:!t.isGlobal,globalId:t.isGlobal?void 0:t.id})},title:"×××××'× ××××××",children:e.jsx(xs,{className:"w-3.5 h-3.5"})}),e.jsxs(ps,{children:[e.jsx(js,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:O=>O.stopPropagation(),title:"× ×¨××ת",children:t.hidden?e.jsx(Je,{className:"w-3.5 h-3.5 text-muted-foreground"}):e.jsx(Me,{className:"w-3.5 h-3.5"})})}),e.jsxs(gs,{className:"w-56 p-3 space-y-3",align:"end",onClick:O=>O.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-medium",children:"×סתר סקש×"}),e.jsx(_,{variant:t.hidden?"default":"outline",size:"sm",className:"h-6 text-[10px]",onClick:()=>r({hidden:!t.hidden}),children:t.hidden?"××סתר":"××צ×"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs font-medium",children:"×סתר ×××ש×ר××"}),e.jsxs(et,{type:"multiple",value:q,onValueChange:O=>r({hideOn:O}),className:"mt-1",children:[e.jsxs(Pe,{value:"desktop",className:"h-7 text-[10px] gap-1",children:[e.jsx(Ze,{className:"w-3 h-3"})," ×סק××פ"]}),e.jsxs(Pe,{value:"tablet",className:"h-7 text-[10px] gap-1",children:[e.jsx(Ee,{className:"w-3 h-3"})," ×××××"]}),e.jsxs(Pe,{value:"mobile",className:"h-7 text-[10px] gap-1",children:[e.jsx(ze,{className:"w-3 h-3"})," ××××××"]})]})]})]})]}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:O=>{O.stopPropagation(),o()},title:"ש×פ××",children:e.jsx(Ve,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:O=>{O.stopPropagation(),n()},title:"××××§×",children:e.jsx(U,{className:"w-3.5 h-3.5 text-destructive"})}),e.jsx(Sa,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:O=>O.stopPropagation(),children:H?e.jsx(Gt,{className:"w-3.5 h-3.5"}):e.jsx(He,{className:"w-3.5 h-3.5"})})})]})]}),e.jsx(Ta,{children:e.jsxs("div",{className:"p-3 pt-0",children:[E&&e.jsx(nt,{style:t.style||{},onChange:l}),G&&e.jsxs("div",{className:"border rounded-lg p-3 mb-3 bg-muted/30 space-y-2",dir:"rtl",children:[e.jsx(g,{className:"text-[10px] font-semibold",children:"CSS ××ת×× ××××××'×"}),e.jsx(te,{placeholder:`color: red; 44background: #f0f0f0;`,value:t.customCSS||"",onChange:O=>r({customCSS:O.target.value}),rows:4,className:"text-xs font-mono",dir:"ltr"})]}),Z&&e.jsx(ct,{style:t.style||{},onChange:l}),e.jsx(ot,{section:t,onUpdate:d})]})})]})})})})}function Zs({id:t,isActive:a}){const{setNodeRef:s,isOver:j}=bs({id:t});return e.jsx("div",{ref:s,className:` 45 relative transition-all duration-200 ease-in-out mx-1 46 ${a?j?"h-16 border-2 border-dashed border-primary bg-primary/10 rounded-lg":"h-8 border-2 border-dashed border-primary/30 bg-primary/5 rounded-lg":"h-1 group-hover:h-4"} 47 flex items-center justify-center 48 `,children:a&&e.jsxs("div",{className:`flex items-center gap-1.5 text-xs font-medium transition-opacity ${j?"text-primary opacity-100":"text-primary/50 opacity-70"}`,children:[e.jsx(se,{className:"w-3.5 h-3.5"}
48),e.jsx("span",{children:j?"ש×רר ×××":"×ר×ר ××××"})]})})}function al({sections:t,globalStyle:a,selectedSectionId:s,isDraggingNewWidget:j,generatingAI:d,popups:l,revisions:r,customTemplates:n,showRevisions:o,pageSettings:b,previewDevice:N,onAddSection:p,onUpdateSection:v,onUpdateSectionStyle:h,onUpdateSectionMeta:I,onRemoveSection:B,onDuplicateSection:L,onSelectSection:E,onDeselectSection:M,onMoveSectionUp:G,onMoveSectionDown:z,onGenerateAI:Z,onUpdateGlobalStyle:w,onAddTemplate:H,onAddPopup:W,onUpdatePopup:ae,onRemovePopup:le,onSaveRevision:Q,onRestoreRevision:fe,onDeleteRevision:ie,onAddFromCustomTemplate:R,onRemoveCustomTemplate:q,onUpdatePageSettings:O,onSetDevice:Te,onToggleRevisions:Ne}){const[A,X]=D.useState("widgets"),[_e,we]=D.useState(!1),ye=s?t.find(P=>P.id===s):null,De=ye?t.findIndex(P=>P.id===s):-1,Ce=ye&&s,$e=[{id:"settings",icon:is,label:"×××ר×ת"},{id:"navigator",icon:_a,label:"× ×××"},{id:"history",icon:Ht,label:"××ס××ר××",action:Ne},{id:"responsive",icon:N==="mobile"?ze:N==="tablet"?Ee:Ze,label:"רספ×× ×¡××"},{id:"shortcuts",icon:Qs,label:"×§×צ××¨× ××§××ת"}];return e.jsxs("div",{className:"w-[300px] shrink-0 bg-[#23272f] text-white flex flex-col h-full border-l border-white/10",children:[e.jsxs("div",{className:"h-12 flex items-center justify-between px-3 border-b border-white/10 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>we(!_e),className:"w-8 h-8 rounded flex items-center justify-center hover:bg-white/10 transition-colors",children:_e?e.jsx(zs,{className:"w-4 h-4"}):e.jsx(Ft,{className:"w-4 h-4"})}),e.jsx("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-pink-500 to-rose-600 flex items-center justify-center text-[10px] font-bold",children:"LP"})]}),e.jsx("div",{className:"flex items-center gap-0.5",children:[{id:"widgets",icon:Qe,label:"×××××'×××"},{id:"sections",icon:as,label:"×¡×§×©× ××"},{id:"templates",icon:$s,label:"ת×× ××ת"},{id:"global",icon:Vs,label:"××××××"},{id:"popups",icon:Es,label:"פ×פ×פ××"}].map(P=>e.jsx(ss,{delayDuration:200,children:e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx("button",{className:`w-7 h-7 rounded flex items-center justify-center transition-all ${!Ce&&A===P.id?"bg-white/15 text-white":"text-white/40 hover:text-white/70 hover:bg-white/5"}`,onClick:()=>{M(),X(P.id)},children:e.jsx(P.icon,{className:"w-3.5 h-3.5"})})}),e.jsx(he,{side:"bottom",className:"text-xs",children:P.label})]})},P.id))})]}),_e&&e.jsxs("div",{className:"absolute inset-0 z-50 bg-[#1a1d23] flex flex-col",style:{width:300},children:[e.jsx("div",{className:"h-12 flex items-center px-3 border-b border-white/10",children:e.jsx("button",{onClick:()=>we(!1),className:"w-8 h-8 rounded flex items-center justify-center hover:bg-white/10",children:e.jsx(zs,{className:"w-4 h-4"})})}),e.jsx("div",{className:"p-4 space-y-1",children:[{id:"widgets",icon:Qe,label:"×××××'×××"},{id:"sections",icon:as,label:"× ×××× ×¡×§×©× ××"},{id:"templates",icon:$s,label:"ת×× ××ת"},{id:"global",icon:Vs,label:"ס×× ×× ××××××"},{id:"popups",icon:Es,label:"פ×פ×פ××"},{id:"settings",icon:is,label:"×××ר×ת ××£"}].map(P=>e.jsxs("button",{className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm text-white/70 hover:bg-white/10 hover:text-white transition-colors",onClick:()=>{X(P.id),we(!1),M()},children:[e.jsx(P.icon,{className:"w-4 h-4"}),P.label]},P.id))})]}),e.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:Ce?e.jsx(el,{section:ye,index:De,totalSections:t.length,onBack:M,onUpdate:P=>v(s,P),onUpdateStyle:P=>h(s,P),onUpdateSection:P=>I(s,P),onRemove:()=>{B(s),M()},onDuplicate:()=>L(s),onMoveUp:()=>G(s),onMoveDown:()=>z(s),onGenerateAI:()=>Z(s),isGenerating:d===s}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-4 py-2.5 border-b border-white/10 shrink-0 flex items-center justify-between",children:[e.jsx("h3",{className:"text-xs font-semibold text-white/60 uppercase tracking-wider",children:A==="widgets"?"×××××'×××":A==="sections"?"×¡×§×©× ××":A==="templates"?"ת×× ××ת":A==="navigator"?"× ××××":A==="global"?"ס×× ×× ××××××":A==="popups"?"פ×פ×פ××":A==="shortcuts"?"×§×צ××¨× ××§××ת":"×××ר×ת ××£"}),A==="widgets"&&e.jsx(pe,{variant:"outline",className:"text-[9px] border-white/20 text-white/40",children:"×ר×ר ×× ×××¥"})]}),e.jsx(Ca,{className:"flex-1",children:e.jsxs("div",{className:"p-3",children:[A==="widgets"&&e.jsx(Xa,{onAdd:p}),A==="sections"&&e.jsx(Qt,{items:t.map(P=>P.id),strategy:Ut,children:e.jsxs("div",{className:"space-y-1.5",children:[t.length===0&&!j&&e.jsxs("div",{className:"text-center py-10",children:[e.jsx(Qe,{className:"w-10 h-10 mx-auto mb-3 text-white/20"}),e.jsx("p",{className:"text-xs text-white/40",children:"××× ×¡×§×©× ×× ×¢××××"}),e.jsx("p",{className:"text-[10px] text-white/30 mt-1",children:`×××¥ ×¢× "×××××'×××" ××× ×××ס××£`})]}),e.jsx(Zs,{id:"drop-zone-0",isActive:j}),t.map((P,re)=>e.jsxs("div",{children:[e.jsx(tl,{section:P,index:re,isSelected:s===P.id,onSelect:()=>E(P.id),onUpdate:ne=>
48v(P.id,ne),onUpdateStyle:ne=>h(P.id,ne),onUpdateSection:ne=>I(P.id,ne),onRemove:()=>B(P.id),onDuplicate:()=>L(P.id),onGenerateAI:()=>Z(P.id),isGenerating:d===P.id}),e.jsx(Zs,{id:`drop-zone-${re+1}`,isActive:j})]},P.id))]})}),A==="templates"&&e.jsx(ll,{customTemplates:n,onAddFromCustomTemplate:R,onRemoveCustomTemplate:q,onAddTemplate:H}),A==="navigator"&&e.jsx("div",{className:"[&_.card]:bg-white/5 [&_.card]:border-white/10 [&_*]:text-white/70",children:e.jsx(Ka,{sections:t,selectedId:s,onSelect:E,onToggleHidden:P=>{var re;return I(P,{hidden:!((re=t.find(ne=>ne.id===P))!=null&&re.hidden)})}})}),A==="global"&&e.jsx("div",{className:"[&_.card]:bg-white/5 [&_.card]:border-white/10 [&_label]:text-white/60 [&_p]:text-white/60 [&_*]:text-white/70",children:e.jsx(Ya,{style:a,onChange:w})}),A==="settings"&&e.jsx(Ja,{settings:b,onChange:O}),A==="popups"&&e.jsx(il,{popups:l,onAddPopup:W,onUpdatePopup:ae,onRemovePopup:le}),A==="shortcuts"&&e.jsx(sl,{}),o&&e.jsx(rl,{revisions:r,onSaveRevision:Q,onRestoreRevision:fe,onDeleteRevision:ie})]})})]})}),e.jsx("div",{className:"h-10 flex items-center justify-around border-t border-white/10 bg-[#1a1d23] shrink-0",children:e.jsx(ss,{delayDuration:200,children:$e.map(P=>e.jsxs(de,{children:[e.jsx(xe,{asChild:!0,children:e.jsx("button",{className:`w-8 h-8 rounded flex items-center justify-center transition-all ${!Ce&&A===P.id?"text-white bg-white/10":"text-white/40 hover:text-white/70 hover:bg-white/5"}`,onClick:()=>{if(P.action)P.action();else if(P.id==="responsive"){const re=["desktop","tablet","mobile"],ne=re.indexOf(N);Te(re[(ne+1)%re.length])}else M(),X(P.id)},children:e.jsx(P.icon,{className:"w-4 h-4"})})}),e.jsx(he,{side:"top",className:"text-xs",children:P.label})]},P.id))})})]})}function ll({customTemplates:t,onAddFromCustomTemplate:a,onRemoveCustomTemplate:s,onAddTemplate:j}){return e.jsxs("div",{className:"space-y-4",children:[t.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-semibold text-white/50 uppercase tracking-wider mb-2",children:"×ת×× ××ת ש××"}),e.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:t.map(d=>e.jsxs("div",{className:"relative group",children:[e.jsxs("button",{className:"w-full py-3 px-2 flex flex-col items-center gap-1.5 text-[10px] rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 hover:border-white/20 transition-all text-white/70",onClick:()=>a(d.id),children:[e.jsx(vs,{className:"w-4 h-4"}),d.name]}),e.jsx("button",{className:"absolute -top-1 -right-1 w-4 h-4 bg-red-500 text-white rounded-full text-[8px] opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",onClick:()=>s(d.id),children:"â"})]},d.id))})]}),rt.map(d=>{const l=Ns.filter(r=>r.category===d.key);return e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-semibold text-white/50 uppercase tracking-wider mb-2",children:d.label}),e.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:l.map(r=>e.jsxs("button",{className:"py-3 px-2 flex flex-col items-center gap-1.5 text-[10px] rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 hover:border-white/20 transition-all text-white/70",onClick:()=>j(r.id),children:[e.jsx(Ke,{className:"w-4 h-4"}),r.name]},r.id))})]},d.key)})]})}function il({popups:t,onAddPopup:a,onUpdatePopup:s,onRemovePopup:j}){return e.jsxs("div",{className:"space-y-3",children:[e.jsxs(_,{size:"sm",variant:"outline",className:"w-full gap-1.5 border-white/20 text-white/70 hover:text-white hover:bg-white/10",onClick:a,children:[e.jsx(se,{className:"w-3.5 h-3.5"})," פ×פ×פ ××ש"]}),t.length===0?e.jsx("p",{className:"text-[10px] text-white/30 text-center py-6",children:"××× ×¤×פ×פ××. צ×ר ×ת ×ר×ש××!"}):e.jsx("div",{className:"space-y-2",children:t.map(d=>e.jsxs("div",{className:"border border-white/10 rounded-lg p-3 space-y-2 bg-white/5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(m,{value:d.name,onChange:l=>s(d.id,{name:l.target.value}),className:"h-7 text-xs w-28 bg-white/5 border-white/10 text-white"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(pe,{variant:d.enabled?"default":"secondary",className:"text-[9px] curs
48or-pointer",onClick:()=>s(d.id,{enabled:!d.enabled}),children:d.enabled?"פע××":"××××"}),e.jsx("button",{className:"p-1 rounded hover:bg-white/10",onClick:()=>j(d.id),children:e.jsx(U,{className:"w-3 h-3 text-red-400"})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-1",children:[e.jsxs("select",{className:"h-7 text-[10px] border border-white/10 rounded px-1 bg-white/5 text-white/70",value:d.trigger,onChange:l=>s(d.id,{trigger:l.target.value}),children:[e.jsx("option",{value:"time-delay",children:"×ש××× (×©× ××ת)"}),e.jsx("option",{value:"scroll",children:"××××× (%)"}),e.jsx("option",{value:"exit-intent",children:"×××× ×ª ×צ×××"}),e.jsx("option",{value:"click",children:"×××צ×"})]}),(d.trigger==="time-delay"||d.trigger==="scroll")&&e.jsx(m,{type:"number",value:d.triggerValue||"",onChange:l=>s(d.id,{triggerValue:l.target.value}),className:"h-7 text-[10px] bg-white/5 border-white/10 text-white",placeholder:d.trigger==="scroll"?"%":"×©× ××ת"})]})]},d.id))})]})}function rl({revisions:t,onSaveRevision:a,onRestoreRevision:s,onDeleteRevision:j}){return e.jsxs("div",{className:"mt-4 border border-white/10 rounded-lg p-3 bg-white/5 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-xs font-semibold text-white/70",children:"××ס××ר××ת ×רס××ת"}),e.jsxs(_,{size:"sm",variant:"outline",className:"h-6 text-[10px] gap-1 border-white/20 text-white/60",onClick:a,children:[e.jsx(vs,{className:"w-3 h-3"})," ש××ר"]})]}),t.length===0?e.jsx("p",{className:"text-[10px] text-white/30 text-center py-3",children:"××× ×רס××ת ש××ר×ת"}):e.jsx("div",{className:"space-y-1 max-h-48 overflow-y-auto",children:[...t].reverse().map(d=>e.jsxs("div",{className:"flex items-center justify-between border border-white/10 rounded p-2 text-[10px]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-white/70",children:d.label}),e.jsx("br",{}),e.jsx("span",{className:"text-white/40",children:new Date(d.timestamp).toLocaleString("he-IL")})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(_,{size:"sm",variant:"outline",className:"h-5 text-[9px] border-white/20 text-white/60",onClick:()=>s(d.id),children:"ש××ר"}),e.jsx("button",{className:"p-0.5 rounded hover:bg-white/10",onClick:()=>j(d.id),children:e.jsx(U,{className:"w-3 h-3 text-red-400"})})]})]},d.id))})]})}function Xs({id:t,isActive:a}){const{setNodeRef:s,isOver:j}=bs({id:t});return e.jsx("div",{ref:s,className:`transition-all duration-200 ease-in-out ${a?j?"h-20 border-2 border-dashed border-blue-400 bg-blue-500/10 rounded-lg mx-4 my-1 flex items-center justify-center":"h-10 border-2 border-dashed border-blue-300/40 bg-blue-500/5 rounded-lg mx-4 my-1 flex items-center justify-center":"h-0"}`,children:a&&e.jsxs("div",{className:`flex items-center gap-1.5 text-xs font-medium transition-opacity ${j?"text-blue-500 opacity-100":"text-blue-400/50 opacity-70"}`,children:[e.jsx(se,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:j?"ש×רר ×××":"×ר×ר ××××"})]})})}function nl({isDragging:t}){const{setNodeRef:a,isOver:s}=bs({id:"canvas-empty-drop"});return e.jsx("div",{ref:a,className:`flex-1 flex items-center justify-center min-h-[600px] transition-all ${t?s?"border-2 border-dashed border-blue-400 bg-blue-50":"border-2 border-dashed border-blue-300/50 bg-blue-50/50":""}`,children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:`w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4 transition-colors ${t?"bg-blue-100":"bg-gray-100"}`,children:e.jsx(se,{className:`w-8 h-8 ${t?"text-blue-400":"text-gray-300"}`})}),e.jsx("p",{className:`text-sm font-medium ${t?"text-blue-500":"text-gray-400"}`,children:t?"ש×רר ××× ××× ×××ס××£":"×ר×ר ×××××'× ××ס××××ר"}),e.jsx("p",{className:"text-gray-300 text-xs mt-1",children:"×× ×××¥ ×¢× ×××××'× ××××¡×¤× ×××ר×"})]})})}function cl({onPick:t,children:a}){const[s,j]=D.useState(!1);return e.jsxs(ps,{open:s,onOpenChange:j,children:[e.jsx(js,{asChild:!0,children:a}),e.jsx(gs,{className:"w-[260px] p-3 bg-[#23272f] border-white/10",side:"top",align:"center",children:e.jsx("div",{className:"space-y-3 max-h-[300px] overflow-auto",children:rt.map(d=>{const l=Ns.filter(r=>r.category===d.key);return l.length?e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-semibold text-white/40 uppercase tracking-wider mb-1.5",children:d.label}),e.jsx("div",{className:"grid grid-cols-2 gap-1",children:l.map(r=>e.jsxs("button",{className:"flex flex-col items-center gap-0.5 p-2 rounded text-[10px] text-white/60 hover:bg-white/10 hover:text-white transition-colors",onClick:()=>{t(r.id),j(!1)},children:[e.jsx(Ke,{className:"w-4 h-4"}),e.jsx("span",{className:"truncate w-full text-center",children:r.name})]},r.id))})]},d.key):null})})})]})}function Ks({onPick:t,children:a}){const[s,j]=D.useState(!1);return e.jsxs(ps,{open:s,onOpenChange:j,children:[e.jsx(js,{asChild:!0,children:a}),e.jsx(gs,{className:"w-[260px] p-3 bg-[#23272f] border-white/10",side:"bottom",align:"center",children:e.jsx("div",{className:"space-y-3 max-h-[300px] overflow-auto",children:Fa.map(d=>e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-semibold text-white/40 uppercase tracking-wider mb-1.5",children:d.label}),e.jsx("div",{className:"grid grid-cols-4 gap-1",children:je.filter(l=>l.category===d.key).map(l=>e.jsxs("button",{className:"flex flex-col items-center gap-0.5 p-1.5 rounded text-[8px] text-white/60 hover:bg-white/10 hover:text-white transition-colors",onClick:()=>{t(l.type),j(!1)},title:l.label,children:[e.jsx(l.icon,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"truncate w-full text-center",children:l.label})]},l.type))})]},d.key))})})]})}function ol({sections:t,globalStyle:a,previewDevice:s,selectedSectionId:j,isDraggingNewWidget:d,draggedWidgetType:l,onSelectSection:r,onDuplicateSection:n,onMoveSectionUp:o,onMoveSectionDown:b,onRemoveSection:N,onToggleHidden:p,onGenerateAI:v,onCopyStyle:h,onPasteStyle:I,onSaveAsTemplate:B,onInlineEdit:L,copiedStyle:E,onAddSectionAt:M,onAddTemplate:G,onCopyWidget:z,onPasteWidget:Z,copiedWidget:w}){const H=D.useRef(null),[W,ae]=D.useState(100),le=s==="mobile"?"390px":s==="tablet"?"768px":"100%",Q=s==="mobile"?"390px":s==="tablet"?"768px":"100%",fe={fontFamily:a.fontFamily||void 0,backgroundColor:a.bgColor||void 0,color:a.textColor||void 0,maxWidth:a.maxWidth||void 0,margin:a.maxWidth?"0 auto":void 0},ie=t.filter(R=>{var q;
48return!(R.hidden||(q=R.hideOn)!=null&&q.includes(s))});return e.jsxs("div",{ref:H,className:"flex-1 overflow-auto bg-[#e5e7eb]",style:{backgroundImage:"radial-gradient(circle, #d1d5db 1px, transparent 1px)",backgroundSize:"20px 20px"},children:[s!=="desktop"&&e.jsx("div",{className:"flex justify-center pt-3 pb-0",children:e.jsx("div",{className:"px-3 py-1 rounded-full bg-blue-500/10 text-blue-600 text-[10px] font-medium",children:s==="mobile"?"390px â ××××××":"768px â ×××××"})}),e.jsx("div",{className:"flex justify-center p-6 min-h-full",style:{transform:`scale(${W/100})`,transformOrigin:"top center"},children:e.jsx("div",{className:"w-full bg-white shadow-2xl overflow-hidden transition-all duration-500 min-h-[600px] flex flex-col",style:{maxWidth:Q,width:le,borderRadius:s!=="desktop"?"16px":"8px",boxShadow:s!=="desktop"?"0 0 0 8px #1a1d23, 0 25px 50px -12px rgba(0,0,0,0.5)":"0 25px 50px -12px rgba(0,0,0,0.25)"},children:ie.length===0?e.jsx(nl,{isDragging:d}):e.jsxs("div",{dir:"rtl",style:fe,children:[e.jsx(Xs,{id:"drop-zone-0",isActive:d}),ie.map((R,q)=>{var Ne;const O=t.findIndex(A=>A.id===R.id),Te=j===R.id;return e.jsxs("div",{children:[e.jsxs(Pa,{children:[e.jsx(Da,{asChild:!0,children:e.jsxs("div",{className:"relative group/preview cursor-pointer transition-all",onClick:()=>r(R.id),children:[e.jsxs("div",{className:"relative",children:[e.jsx(tt,{section:R,onInlineEdit:(A,X)=>L(R.id,A,X)}),e.jsxs("div",{className:`absolute inset-0 transition-all pointer-events-none ${Te?"opacity-100":"opacity-0 group-hover/preview:opacity-100"}`,children:[e.jsx("div",{className:"absolute top-0 left-0 right-0 h-[2px] bg-blue-500"}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-blue-500"}),e.jsx("div",{className:"absolute top-0 bottom-0 left-0 w-[2px] bg-blue-500"}),e.jsx("div",{className:"absolute top-0 bottom-0 right-0 w-[2px] bg-blue-500"}),e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-auto",children:e.jsxs("div",{className:"flex items-center gap-1 bg-blue-500 text-white rounded shadow-lg overflow-hidden",children:[e.jsx("div",{className:"px-1.5 py-1 hover:bg-blue-600 cursor-grab active:cursor-grabbing transition-colors",children:e.jsx(fs,{className:"w-3 h-3"})}),e.jsx("span",{className:"text-[9px] font-medium pr-1 whitespace-nowrap",children:R.label||((Ne=je.find(A=>A.type===R.type))==null?void 0:Ne.label)||R.type})]})}),e.jsx("div",{className:"absolute top-2 right-2 pointer-events-auto",children:e.jsx("button",{className:"w-6 h-6 rounded bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors shadow",onClick:A=>{A.stopPropagation(),r(R.id)},title:"ער××",children:e.jsx(Ms,{className:"w-3 h-3"})})}),e.jsxs("div",{className:"absolute top-2 left-2 pointer-events-auto flex gap-0.5",children:[e.jsx("button",{className:"w-6 h-6 rounded bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors shadow",onClick:A=>{A.stopPropagation(),n(R.id)},title:"ש×פ×",children:e.jsx(Ve,{className:"w-3 h-3"})}),e.jsx("button",{className:"w-6 h-6 rounded bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors shadow",onClick:A=>{A.stopPropagation(),N(R.id)},title:"×××§",children:e.jsx(U,{className:"w-3 h-3"})})]})]})]}),!d&&q<ie.length-1&&e.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2 z-20 opacity-0 group-hover/preview:opacity-100 transition-opacity pointer-events-auto",children:e.jsx(Ks,{onPick:A=>M(A,O+1),children:e.jsx("div",{className:"w-5 h-5 rounded-full bg-blue-500 text-white flex items-center justify-center cursor-pointer hover:bg-blue-600 shadow-lg",children:e.jsx(se,{className:"w-3 h-3"})})})})]})}),e.jsxs(Ia,{className:"w-56",children:[e.jsxs(ce,{className:"gap-2",onClick:()=>r(R.id),children:[e.jsx(Ms,{className:"w-4 h-4"})," ער××ת ×××××'×"]}),e.jsx(Ie,{}),e.jsxs(ce,{className:"gap-2",onClick:()=>n(R.id),children:[e.jsx(Ve,{className:"w-4 h-4"})," ש×פ××"]}),e.jsxs(ce,{className:"gap-2",onClick:()=>z==null?void 0:z(R.id),children:[e.jsx(La,{className:"w-4 h-4"})," ×עתק ×××××'×"]}),e.jsxs(ce,{className:"gap-2",onClick:()=>Z==null?void 0:Z(O+1),disabled:!w,children:[e.jsx(Bt,{className:"w-4 h-4"})," ××××§ ×××××'×"]}),e.jsx(Ie,{}),e.jsxs(ce,{className:"gap-2",onClick:()=>h(R.id),children:[e.jsx(Ra,{className:"w-4 h-4"})," ×עתק ס×× ××"]}),e.jsxs(ce,{className:"gap-2",onClick:()=>I(R.id),disabled:!E,children:[e.jsx(Oa,{className:"w-4 h-4"})," ××××§ ס×× ××"]}),e.jsx(Ie,{}),e.jsxs(ce,{className:"gap-2",onClick:()=>o(R.id),disabled:q===0,children:[e.jsx(Js,{className:"w-4 h-4"})," ××× ×××¢××"]}),e.jsxs(ce,{className:"gap-2",onClick:()=>b(R.id),disabled:q===ie.length-1,children:[e.jsx(st,{className:"w-4 h-4"})," ××× ××××"]}),e.jsx(Ie,{}),e.jsxs(ce,{className:"gap-2",onClick:()=>p(R.id),children:[R.hidden?e.jsx(Me,{className:"w-4 h-4"}):e.jsx(Je,{className:"w-4 h-4"}),R.hidden?"×צ×":"×סתר"]}),e.jsxs(ce,{className:"gap-2",onClick:()=>v(R.id),children:[e.jsx(Ye,{className:"w-4 h-4"})," ×צ×רת ת××× AI"]}),e.jsxs(ce,{className:"gap-2",onClick:()=>B(R.id),children:[e.jsx(vs,{className:"w-4 h-4"})," ש××ר ×ת×× ×ת"]}),e.jsx(Ie,{}),e.jsxs(ce,{className:"gap-2 text-destructive focus:text-destructive",onClick:()=>N(R.id),children:[e.jsx(U,{className:"w-4 h-4"})," ×××§"]})]})]}),e.jsx(Xs,{id:`drop-zone-${O+1}`,isActive:d})]},R.id)}),!d&&e.jsxs("div",{className:"py-6 flex justify-center gap-3",children:[e.jsx(Ks,{onPick:R=>M(R,t.length),children:e.jsxs("button",{className:"flex items-center gap-2 px-6 py-3 rounded-lg border-2 border-dashed border-gray-300 text-gray-400 hover:border-blue-400 hover:text-blue-500 transition-colors",children:[e.jsx(se,{className:"w-5 h-5"}),e.jsx("span",{className:"text-sm font-medium",children:"××סף ×××××'×"})]})}),e.jsx(cl,{onPick:R=>G(R),children:e.jsxs("button",{className:"flex items-center gap-2 px-6 py-3 rounded-lg border-2 border-dashed border-gray-300 text-gray-400 hover:border-purple-400 hover:text-purple-500 transition-colors",children:[e.jsx(za,{className:"w-5 h-5"}),e.jsx("span",{className:"text-sm font-medium",children:"××סף ת×× ×ת"})]})})]})]})})}),e.jsxs("div",{className:"fixed bottom-6 left-6 z-30 flex items-center gap-1 bg-[#23272f] rounded-lg shadow-lg border border-white/10 p-1",children:[e.jsx("button",{className:"w-7 h-7 rounded flex items-center justify-center text-white/50 hover:text-white hover:bg-white/10 transition-colors disabled:opacity-30",onClick:()=>ae(R=>Math.max(50,R-10)),disabled:W<=50,title:"××§××",children:e.jsx(pa,{className:"w-3.5 h-3.5"})}),e.jsxs("span",{className:"text-[10px] text-white/60 w-10 text-center font-mono",children:[W,"%"]}),e.jsx("button",{className:"w-7 h-7 rounded flex items-center justify-center text-white/50 hover:text-white hover:bg-white/10 transition-colors disabled:opacity-30",onClick:()=>ae(R=>Math.min(150,R+10)),disabled:W>=150,title:"××××",children:e.jsx(ja,{className:"w-3.5 h-3.5"})}),W!==100&&e.jsx("button",{className:"w-7 h-7 rounded flex items-center justify-center text-white/50 hover:text-white hover:bg-white/10 transition-colors",onClick:()=>ae(100),title:"×פס ×××",children:e.jsx(Wt,{className:"w-3 h-3"})})]})]})}function li(){const{selectedClient:t}=qt(),{t:a,language:s}=ve(),[j,d]=D.useState([]),[l,r]=D.useState(!0),[n,o]=D.useState(null),[b,N]=D.useState(!1),[p,v]=D.use
48State(""),[h,I]=D.useState(""),B=w=>w.trim().toLowerCase().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")||`page-${Date.now()}`,L=D.useCallback(async()=>{if(!t)return;r(!0);const{data:w}=await ee.from("landing_pages").select("*").eq("client_id",t.id).order("created_at",{ascending:!1});d(w||[]),r(!1)},[t==null?void 0:t.id]);D.useEffect(()=>{L()},[L]);const E=async()=>{if(!t||!p.trim())return;let w=h.trim()?h.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""):B(p);(!w||w==="-"||/^-+$/.test(w))&&(w=`page-${Date.now()}`);const{data:H}=await ee.from("landing_pages").select("id").eq("slug",w).maybeSingle();H&&(w=`${w}-${Math.random().toString(36).slice(2,6)}`);const{error:W}=await ee.from("landing_pages").insert({client_id:t.id,name:p.trim(),slug:w,page_data:{sections:[]}});if(W){V.error(a("landing.errorCreating"));return}V.success(a("landing.pageCreated")),N(!1),v(""),I(""),L()},M=async w=>{if(!t)return;const{error:H}=await ee.from("landing_pages").insert({client_id:t.id,name:`${w.name} (${a("landing.copyLabel")})`,slug:`${w.slug}-copy-${Date.now()}`,page_data:w.page_data,meta_title:w.meta_title,meta_description:w.meta_description});if(H){V.error(a("landing.errorDuplicating"));return}V.success(a("landing.pageDuplicated")),L()},G=async w=>{await ee.from("landing_pages").delete().eq("id",w),V.success(a("landing.pageDeleted")),(n==null?void 0:n.id)===w&&o(null),L()},z=async w=>{const H=w.status==="published"?"draft":"published";await ee.from("landing_pages").update({status:H,published_at:H==="published"?new Date().toISOString():null}).eq("id",w.id),V.success(a(H==="published"?"landing.pagePublished":"landing.pageDraft")),L()},Z=async(w,H)=>{await ee.from("landing_pages").update(H).eq("id",w.id);const W={...w,...H};o(W),d(ae=>ae.map(le=>le.id===w.id?W:le))};return t?e.jsxs("div",{className:"p-6 space-y-6",dir:"rtl",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"××× × ××¤× × ××ת×"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"צ×ר ××¤× × ×××ª× ×¢× ×¢×¨××× ×××××××ת, AI ×-A/B testing"})]}),e.jsxs(ns,{open:b,onOpenChange:N,children:[e.jsx(Ys,{asChild:!0,children:e.jsxs(_,{className:"gap-1.5",children:[e.jsx(se,{className:"w-4 h-4"})," ××£ ××ש"]})}),e.jsxs(cs,{dir:"rtl",children:[e.jsx(os,{children:e.jsx(ds,{children:"×צ×רת ××£ × ××ת×"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(m,{placeholder:"×©× ×××£",value:p,onChange:w=>{v(w.target.value),h||I(B(w.target.value))}}),e.jsxs("div",{children:[e.jsx(m,{placeholder:"slug (×ת××ת URL) - ××××ר ×××××××ת",value:h,onChange:w=>I(w.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")),dir:"ltr"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",dir:"ltr",children:["blacksheepbi.com/lp/",h||B(p)||"..."]})]}),e.jsx(_,{onClick:E,className:"w-full",disabled:!p.trim(),children:"צ×ר ××£"})]})]})]})]}),n?e.jsx(xl,{page:n,onBack:()=>o(null),onSave:Z,onTogglePublish:z}):e.jsx(e.Fragment,{children:l?e.jsx("p",{className:"text-muted-foreground",children:"×××¢×..."}):j.length===0?e.jsx(We,{children:e.jsxs(qe,{className:"p-8 text-center",children:[e.jsx(Ke,{className:"w-12 h-12 text-muted-foreground mx-auto mb-3"}),e.jsx("p",{className:"text-muted-foreground",children:"××× ××¤× × ×××ª× ×¢××××. צ×ר ×ת ×ר×ש××!"})]})}):e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:j.map(w=>{var H;return e.jsxs(We,{className:"group cursor-pointer hover:border-primary/50 transition-colors",onClick:()=>o(w),children:[e.jsx(Zt,{className:"pb-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Xt,{className:"text-sm",children:w.name}),e.jsx(pe,{className:w.status==="published"?"bg-green-500/20 text-green-400 border-green-500/30":"",children:w.status==="published"?"×פ×רס×":"×××××"})]})}),e.jsxs(qe,{children:[e.jsxs("p",{className:"text-xs text-muted-foreground font-mono mb-3",children:["/",w.slug]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(pe,{variant:"outline",className:"text-[10px]",children:[(((H=w.page_data)==null?void 0:H.sections)||[]).length," ×¡×§×©× ××"]}),e.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[w.status==="published"&&e.jsx(dl,{slug:w.slug,size:"card"}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:W=>{W.stopPropagation(),z(w)},children:e.jsx(Oe,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:W=>{W.stopPropagation(),M(w)},children:e.jsx(Ve,{className:"w-3.5 h-3.5"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:W=>{W.stopPropagation(),G(w.id)},children:e.jsx(U,{className:"w-3.5 h-3.5 text-destructive"})})]})]})]})]},w.id)})})})]}):null}function dl({slug:t,size:a}){const[s,j]=D.useState(!1),{t:d}=ve(),l=`https://blacksheepbi.com/lp/${t}`,r=n=>{n.stopPropagation(),navigator.clipboard.writeText(l),j(!0),V.success(d("landing.linkCopied")),setTimeout(()=>j(!1),2e3)};return a==="card"?e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:r,title:"×עתק ××× ×§",children:s?e.jsx(ts,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(ls,{className:"w-3.5 h-3.5"})}):e.jsxs(_,{variant:"outline",size:"sm",className:"gap-1",onClick:r,children:[s?e.jsx(ts,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(ls,{className:"w-3.5 h-3.5"}),s?"××עתק!":"×עתק ××× ×§"]})}function xl({page:t,onBack:a,onSave:s,onTogglePublish:j}){var _s,Ps,Ds,Is,Ls,Rs;const{t:d,language:l}=ve(),r=((_s=t.page_data)==null?void 0:_s.sections)||[],n=((Ps=t.page_data)==null?void 0:Ps.globalStyle)||{},[o,b]=D.useState("desktop"),[N,p]=D.useState(null),[v,h]=D.useState(null),[I,B]=D.useState(null),[L,E]=D.useState(!1),[M,G]=D.useState(!1),z=((Ds=t.page_data)==null?void 0:Ds.customTemplates)||[],Z=((Is=t.page_data)==null?void 0:Is.popups)||[],w=((Ls=t.page_data)==null?void 0:Ls.revisions)||[],[H,W]=D.useState(!1),[ae,le]=D.use
48State(null),[Q,fe]=D.useState(null),[ie,R]=D.useState([r]),[q,O]=D.useState(0),Te=q>0,Ne=q<ie.length-1,A=ea(As(ia,{activationConstraint:{distance:8}}),As(la)),X=u=>{const c=ie.slice(0,q+1);c.push(u),c.length>50&&c.shift(),R(c),O(c.length-1),s(t,{page_data:{...t.page_data,sections:u}})},_e=()=>{if(!Te)return;const u=ie[q-1];O(q-1),s(t,{page_data:{...t.page_data,sections:u}})},we=()=>{if(!Ne)return;const u=ie[q+1];O(q+1),s(t,{page_data:{...t.page_data,sections:u}})};D.useEffect(()=>{const u=c=>{(c.ctrlKey||c.metaKey)&&c.key==="z"&&(c.preventDefault(),c.shiftKey?we():_e()),(c.ctrlKey||c.metaKey)&&c.key==="y"&&(c.preventDefault(),we())};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)});const ye=(u,c)=>{const x={id:crypto.randomUUID(),type:u,content:Ha(u,l),order:c,style:{bgColor:"",textColor:"",padding:"py-8 px-6"}},y=[...r];y.splice(c,0,x),X(y)},De=u=>{ye(u,r.length)},Ce=(u,c)=>{const x=r.find(y=>y.id===u);if(x!=null&&x.isGlobal&&(x!=null&&x.globalId)){const y=x.globalId;X(r.map(F=>F.globalId===y?{...F,content:c}:F))}else X(r.map(y=>y.id===u?{...y,content:c}:y))},$e=(u,c)=>{const x=r.find(y=>y.id===u);if(x!=null&&x.isGlobal&&(x!=null&&x.globalId)){const y=x.globalId;X(r.map(F=>F.globalId===y?{...F,style:{...F.style,...c}}:F))}else X(r.map(y=>y.id===u?{...y,style:{...y.style,...c}}:y))},P=(u,c)=>{X(r.map(x=>x.id===u?{...x,...c}:x))},re=u=>{h(u),setTimeout(()=>{const c=document.getElementById(`section-editor-${u}`);c==null||c.scrollIntoView({behavior:"smooth",block:"center"})},100)},ne=u=>X(r.filter(c=>c.id!==u)),ws=u=>{const c=r.findIndex(F=>F.id===u);if(c<0)return;const x={...r[c],id:crypto.randomUUID(),content:{...r[c].content}},y=[...r];y.splice(c+1,0,x),X(y)},ys=u=>{const c=r.findIndex(x=>x.id===u);c<=0||X(Ue(r,c,c-1))},Cs=u=>{const c=r.findIndex(x=>x.id===u);c<0||c>=r.length-1||X(Ue(r,c,c+1))},dt=u=>{var c,x;(x=(c=u.active.data)==null?void 0:c.current)!=null&&x.isNewWidget&&(W(!0),le(u.active.data.current.type||null))},xt=u=>{var oe,Os;const{active:c,over:x}=u;if(W(!1),le(null),(Os=(oe=c.data)==null?void 0:oe.current)!=null&&Os.isNewWidget){const ke=c.data.current.type;if(x!=null&&x.id&&String(x.id).startsWith("drop-zone-")){const _t=parseInt(String(x.id).replace("drop-zone-",""),10);ye(ke,_t)}else x==null||x.id,De(ke);return}if(!x||c.id===x.id)return;const y=r.findIndex(ke=>ke.id===c.id),F=r.findIndex(ke=>ke.id===x.id);y>=0&&F>=0&&X(Ue(r,y,F))},ks=async u=>{var x;const c=r.find(y=>y.id===u);if(c){p(u);try{const y=await ee.functions.invoke("ai-generate-content",{body:{section_type:c.type,current_content:c.content,page_name:t.name}});if(y.error)throw y.error;(x=y.data)!=null&&x.content&&(Ce(u,y.data.content),V.success(d("landing.aiContentCreated")))}catch{V.error(d("landing.aiContentError"))}p(null)}},ht=u=>{const c={...n,...u};s(t,{page_data:{...t.page_data,globalStyle:c,sections:r}})},mt=u=>{const c=r.find(x=>x.id===u);c!=null&&c.style&&(B({...c.style}),V.success("ס×× ×× ××עתק"))},ut=u=>{if(!I){V.error("××× ×¡×× ×× ×××××§×");return}$e(u,I),V.success("ס×× ×× ×××××§")},Ss=u=>{const c=r.find(oe=>oe.id===u);if(!c)return;const x=prompt("×©× ×ת×× ×ת:");if(!x)return;const y={id:crypto.randomUUID(),name:x,section:{...c,id:crypto.randomUUID(),content:{...c.content},style:{...c.style}}},F=[...z,y];s(t,{page_data:{...t.page_data,customTemplates:F,sections:r}}),V.success(`ת×× ×ת "${x}" × ×©×ר×`)},pt=u=>{const c=z.find(x=>x.id===u);c&&(X([...r,{...c.section,id:crypto.randomUUID()}]),V.success(`ת×× ×ת "${c.name}" × ×ספ×`))},jt=u=>{const c=z.filter(x=>x.id!==u);s(t,{page_data:{...t.page_data,customTemplates:c,sections:r}}),V.success("ת×× ×ת × ×××§×")},Ts=u=>{const c=Ns.find(y=>y.id===u);if(!c)return;const x=c.sections.map(y=>({...y,id:crypto.randomUUID(),content:{...y.content},style:{...y.style}}));X([...r,...x]),V.success(l==="he"?`ת×× ×ת "${c.name}" × ×ספ×`:`Template "${c.name}" added`)},gt=()=>{const u={id:crypto.randomUUID(),name:`פ×פ×פ ${Z.length+1}`,trigger:"time-delay",triggerValue:"5",sections:[],enabled:!0};s(t,{page_data:{...t.page_data,popups:[...Z,u],sections:r}}),V.success("פ×פ×פ × ×סף")},vt=(u,c)=>{s(t,{page_data:{...t.page_data,popups:Z.map(x=>x.id===u?{...x,...c}:x),sections:r}})},bt=u=>{s(t,{page_data:{...t.page_data,popups:Z.filter(c=>c.id!==u),sections:r}}),V.success("פ×פ×פ × ×××§")},ft=u=>{const c={id:crypto.randomUUID(),timestamp:new Date().toISOString(),label:`××¨×¡× ${w.length+1}`,data:{sections:JSON.parse(JSON.stringify(r)),globalStyle:n}},x=[...w,c].slice(-20);s(t,{page_data:{...t.page_data,revisions:x,sections:r}}),V.success("××¨×¡× × ×©×ר×")},Nt=u=>{const c=w.find(x=>x.id===u);c&&(s(t,{page_data:{...t.page_data,sections:c.data.sections,globalStyle:c.data.globalStyle}}),V.success("××¨×¡× ×©×××ר×"))},wt=u=>{s(t,{page_data:{...t.page_data,revisions:w.filter(c=>c.id!==u),sections:r}})},yt=()=>{const u=JSON.stringify(t.page_data,null,2),c=new Blob([u],{type:"application/json"}),x=URL.createObjectURL(c),y=document.createElement("a");y.href=x,y.download=`${t.slug}.json`,y.click(),URL.revokeObjectURL(x),V.success("×××£ ×××¦× ××צ×××")},Ct=()=>{const u=document.createElement("input");u.type="file",u.accept=".json",u.onchange=async c=>{var y;const x=(y=c.target.files)==null?void 0:y[0];if(x)try{const F=await x.text(),oe=JSON.parse(F);oe.sections?(s(t,{page_data:oe}),V.success("×××£ ×××× ××צ×××")):V.error("×§×××¥ ×× ×ª×§××
48")}catch{V.error("ש×××× ××××××")}},u.click()},kt=u=>{const c=u.map(x=>({...x,id:x.id||crypto.randomUUID(),style:x.style||{padding:"py-8 px-6"}}));X([...r,...c])},St=u=>{const c=r.find(x=>x.id===u);c&&(fe(JSON.parse(JSON.stringify(c))),V.success("×××××'× ××עתק"))},Tt=u=>{if(!Q)return;const c={...Q,id:crypto.randomUUID()},x=[...r];x.splice(u,0,c),X(x),V.success("×××××'× ×××××§")};if(M){const u={fontFamily:n.fontFamily||void 0,backgroundColor:n.bgColor||void 0,color:n.textColor||void 0,maxWidth:n.maxWidth||void 0,margin:n.maxWidth?"0 auto":void 0},c=o==="mobile"?"max-w-[390px]":o==="tablet"?"max-w-[768px]":"max-w-full";return e.jsxs("div",{className:"fixed inset-0 z-[100] bg-background flex flex-col",style:{right:0},children:[e.jsxs("div",{className:"h-12 bg-muted/80 border-b flex items-center justify-between px-4",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>G(!1),children:l==="he"?"â ×××¨× ××¢×ר×":"â Back to editor"}),e.jsx("div",{className:"flex gap-1",children:["desktop","tablet","mobile"].map(x=>e.jsx(_,{variant:o===x?"default":"outline",size:"sm",onClick:()=>b(x),children:x==="desktop"?"ð¥":x==="tablet"?"ð±":"ð²"},x))}),e.jsx("div",{})]}),e.jsx("div",{className:"flex-1 overflow-auto flex justify-center bg-muted p-4",children:e.jsx("div",{className:`${c} w-full bg-white rounded-lg overflow-hidden shadow-xl`,children:e.jsx("div",{dir:l==="he"?"rtl":"ltr",style:u,children:r.filter(x=>{var y;return!x.hidden&&!((y=x.hideOn)!=null&&y.includes(o))}).map(x=>e.jsx(tt,{section:x},x.id))})})})]})}return e.jsxs("div",{className:"flex flex-col bg-[#1a1d23] -m-6 h-[calc(100vh-4rem)] overflow-hidden",dir:"rtl",children:[e.jsx(Za,{pageName:t.name,pageSlug:t.slug,pageStatus:t.status,canUndo:Te,canRedo:Ne,onBack:a,onUndo:_e,onRedo:we,onTogglePublish:()=>j(t),onExport:yt,onImport:Ct,onPreview:()=>G(!0),onImportFromUrl:kt}),e.jsx("div",{className:"flex flex-1 min-h-0",children:e.jsxs(sa,{sensors:A,collisionDetection:ta,onDragStart:dt,onDragEnd:xt,children:[e.jsx(al,{sections:r,globalStyle:n,selectedSectionId:v,isDraggingNewWidget:H,generatingAI:N,popups:Z,revisions:w,customTemplates:z,showRevisions:L,pageSettings:{meta_title:t.meta_title||"",meta_description:t.meta_description||"",...((Rs=t.page_data)==null?void 0:Rs.pageSettings)||{}},previewDevice:o,onAddSection:De,onUpdateSection:Ce,onUpdateSectionStyle:$e,onUpdateSectionMeta:P,onRemoveSection:ne,onDuplicateSection:ws,onSelectSection:re,onDeselectSection:()=>h(null),onMoveSectionUp:ys,onMoveSectionDown:Cs,onGenerateAI:ks,onUpdateGlobalStyle:ht,onAddTemplate:Ts,onAddPopup:gt,onUpdatePopup:vt,onRemovePopup:bt,onSaveRevision:()=>ft(),onRestoreRevision:Nt,onDeleteRevision:wt,onAddFromCustomTemplate:pt,onRemoveCustomTemplate:jt,onSaveAsTemplate:Ss,onSetDevice:b,onToggleRevisions:()=>E(!L),onUpdatePageSettings:u=>{var oe;const{meta_title:c,meta_description:x,...y}=u,F={};c!==void 0&&(F.meta_title=c),x!==void 0&&(F.meta_description=x),Object.keys(y).length>0&&(F.page_data={...t.page_data,pageSettings:{...((oe=t.page_data)==null?void 0:oe.pageSettings)||{},...y},sections:r}),Object.keys(F).length>0&&s(t,F)}}),e.jsx(ol,{sections:r,globalStyle:n,previewDevice:o,selectedSectionId:v,isDraggingNewWidget:H,draggedWidgetType:ae,onSelectSection:re,onDuplicateSection:ws,onMoveSectionUp:ys,onMoveSectionDown:Cs,onRemoveSection:ne,onToggleHidden:u=>{var c;return P(u,{hidden:!((c=r.find(x=>x.id===u))!=null&&c.hidden)})},onGenerateAI:ks,onCopyStyle:mt,onPasteStyle:ut,onSaveAsTemplate:Ss,onInlineEdit:(u,c,x)=>{var y;return Ce(u,{...(y=r.find(F=>F.id===u))==null?void 0:y.content,[c]:x})},copiedStyle:I,onAddSectionAt:ye,onAddTemplate:Ts,onCopyWidget:St,onPasteWidget:Tt,copiedWidget:Q}),H&&e.jsx(aa,{children:(()=>{const u=ae?je.find(x=>x.type===ae):null,c=u==null?void 0:u.icon;return e.jsxs("div",{className:"px-4 py-3 bg-blue-500 text-white rounded-lg shadow-xl text-sm font-medium opacity-90 flex items-center gap-2",children:[c&&e.jsx(c,{className:"w-4 h-4"}),(u==null?void 0:u.label)||"×××××'×"]})})()})]})})]})}export{li 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.