1import{e as r,c as l,j as e,H as Ze,t as Q}from"./app-D5Bf_dbH.js";import{U as et}from"./UserLayout-C9WnFx_O.js";import{u as tt}from"./use-url-params-CMd6wWGJ.js";import{B as nt}from"./badge-BdtyRZeW.js";import{L as h}from"./label-Cm1tsOLE.js";import{S as R}from"./switch-DHdp9Rsv.js";import{S as st}from"./slider-ydr0X3Hh.js";import{d as s,S as g,a as m,b as f,c as p}from"./select-Ckvsxj-Q.js";import{i as it,j as ie,k as oe,l as ae,p as A,B as ot}from"./useGlobalShortcuts-C3mPQ3zf.js";import{T as at,a as lt,b as Ce,c as ye}from"./tabs-CP56cn5t.js";import{C as rt,d as le}from"./card-CUwjT2hB.js";import{D as ct,b as dt,c as ht,d as xt,e as ut}from"./dialog-BgEHdzUT.js";import{T as ve,a as Ne,b as Se,c as we}from"./tooltip-CMiJQMfJ.js";import{P as re,O as D,a as ce}from"./OptimizedTextarea-CgRNql8u.js";import{C as N}from"./ColorPicker-Csc83nIz.js";import{h as gt}from"./Color-CP6FfhGT.js";import{B as a}from"./button-BooRjUAf.js";import{A as k,m as P}from"./react-BPWwdghM.js";import{S as mt}from"./spinner-CoXWKYJB.js";import{u as de}from"./useMutation-CYPzw-WH.js";import{R as ft,i as pt,j as bt,k as jt}from"./RetainSetupBanner-Ce4W-j1b.js";import{o as z,s as S,b as I}from"./types-_GEfgABB.js";import{I as Ct}from"./Index-Dfn3B9ir.js";import{R as yt}from"./RetainUpsellModal-uQIvz2rz.js";import{E as vt}from"./eye-jUg7xQoe.js";import{T as Te}from"./triangle-alert-Dlnfy8oB.js";import{C as Nt}from"./circle-check-big-UT3V2u80.js";import{C as ke}from"./circle-alert-Cx6WfyGq.js";import{C as St}from"./chevron-right-Ba0gC1l7.js";import"./WistiaDialogContext-DEfy83sd.js";import"./index-eCYNzz1C.js";import"./input-DqZbbFgj.js";import"./separator-DsWrB1WR.js";import"./index-D4lci4mZ.js";import"./sheet-lU-qfqG8.js";import"./index-B02_DhYT.js";import"./react-icons.esm-CCm293eC.js";import"./rotate-ccw-hNqG30TC.js";import"./createLucideIcon-CyKN5i_O.js";import"./users-jvAb0Hsa.js";import"./settings-x0uW8CTG.js";import"./dropdown-menu-DXUwCH2H.js";import"./index-Cn72dBP_.js";import"./index-DI8WOxmI.js";import"./index-rimmKLID.js";import"./workflow-nfp-eV15.js";import"./circle-x-DJWwu-M6.js";import"./search-F-2nffFh.js";import"./plus-C4zOu0jA.js";import"./avatar-CQYHhkys.js";import"./user-CODNnX9U.js";import"./credit-card-BU_LCcMi.js";import"./mail-Bw_TZjX-.js";import"./life-buoy-CAWDIjwj.js";import"./log-out-Cqz61TM3.js";import"./bell-B-abMZvc.js";import"./circle-help-vR0qTlf_.js";import"./sonner-CJXwkPTZ.js";import"./x-JT2YrhZw.js";import"./alert-CGHGpkpD.js";import"./index-D17hSi50.js";import"./index-D2PwZ_9r.js";import"./scroll-area-CnV8vZPq.js";import"./CSLOGO_lghtbg-12-DL8MB5gQ.js";import"./popover-CBJwT1Kl.js";import"./shopping-cart-BYHhTvfT.js";import"./lock-_lQojS3k.js";import"./textarea-B7JlslAZ.js";import"./loader-circle-CNDCpqRX.js";import"./info-Ysfx8r5c.js";import"./check-CryfuyH3.js";import"./split-Cj2bqj2p.js";import"./sparkles-DUPGoOnx.js";import"./transition-DHdGMbel.js";import"./clock-BsnZuTuE.js";import"./EmailPreview-FHJMutfX.js";import"./bee-config-CSYsRGES.js";import"./table-Dn41ev5Z.js";import"./useQuery-Ck5YMTmY.js";import"./ellipsis-vertical-Drq0s-FO.js";import"./square-pen-DqdCzrcN.js";import"./mail-x-CWRBTp_H.js";import"./pencil-IUM46yH1.js";import"./alert-dialog-DkF-XHVk.js";import"./ButtonSpinner2-CEhWnYe3.js";import"./EmailDesignDialog-MoQi5ndR.js";import"./AISuggestions-B_T0Zk_y.js";import"./sparkle-CrwnQdho.js";import"./site-api-DLyJnXUW.js";import"./dialog-B0zJechG.js";const he={active:!1,siteId:"pI9VYVg=",dialogId:"Pb3E9aQRfSbeKgtl",templateId:"template4/1.0.0",swatches:[],styleConfig:{headerProps:{backgroundColor:"#2C3E50",textColor:"#FFFFFF",fontSize:"18px",fontFamily:"Helvetica",fontWeight:"bold",padding:"0.25rem 0 0 0",margin:"0",lineHeight:"1.1",icon:{maxHeight:"35px",maxWidth:"35px",padding:"0",backgroundColor:"#fff",borderRadius:"0.2rem",boxShadow:"rgba(100, 100, 111, 0.2) 0 7px 29px 0"}},overlayProps:{backgroundColor:"#0000008c"},popupProps:{backgroundColor:"#ffffff",borderRadius:"1.2rem",padding:"0",margin:"0",boxShadow:"rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px"},headingProps:{textColor:"#4C4B4B",fontSize:"28px",fontFamily:"Arial",fontWeight:"400",padding:"0",margin:"0",lineHeight:"1"},thankYouHeadingProps:{textColor:"#333",fontSize:"38px",fontFamily:"Helvetica",fontWeight:"bold",padding:"0",margin:"0",lineHeight:"1.2"},textProps:{textColor:"#333",fontSize:"16px",fontFamily:"Helvetica",fontWeight:"400",padding:"0.75rem 0",margin:"1rem 0 0 0",lineHeight:"1.2"},thankYouTextProps:{textColor:"#333",fontSize:"18px",fontFamily:"Helvetica",fontWeight:"400",padding:"0.75rem 0",margin:"1rem 0 0 0",lineHeight:"1.2"},inputProps:{textColor:"#333",backgroundColor:"#ffffff",fontFamily:"Arial, sans-serif",fontSize:"0.875rem",borderRadius:"0.375rem",lineHeight:"1.5rem",border:"1px solid #6b7280",padding:"0.65rem 0.75rem",margin:"0"},buttonProps:{textColor:"#FFFFFF",backgroundColor:"#36A582",fontFamily:"Helvetica",fontSize:"18px",fontWeight:"bold",borderRadius:"0.375rem",padding:"1rem 1.5rem",margin:"0",width:"100%",lineHeight:"1"},closeButtonProps:{color:"#333333"},dashedSectionProps:{container:{margin:"1rem 0 0 0",padding:"1rem",textAlign:"center"},textColor:"#3b3b3b",fontSize:"18px",fontFamily:"Helvetica",fontWeight:"400",lineHeight:"1.1",padding:"0",margin:"0",dashedBorder:!0,link:{textColor:"#2463eb",textDecoration:"underline",fontWeight:"500",fontSize:"0.875rem",lineHeight:"1.1",padding:"0",margin:"0.5rem 0 0 0",fontFamily:"Arial, sans-serif"}},seperatorProps:{borderColor:"#b4b4b4",borderThickness:"1px",borderStyle:"solid"}
1,cartItemsProps:{backgroundColor:"#ededed",header:{textColor:"#334152",textDecoration:"none",fontWeight:"500",fontSize:"1rem",lineHeight:"1",padding:"0",margin:"0",fontFamily:"Arial, sans-serif",textAlign:"center",border:"none"}}},contentConfig:{heading:{text:"Not ready to buy? No problem!",thankYouText:"Thank You!"},body:{text:"Send yourself an email with these cart items, in case you're unable to complete your purchase now.",thankYouText:"Please check your email inbox for the your cart items details."},buttonText:"Send My Cart",cartItems:{header:{enabled:!0,text:"Cart Items"}},seperator:{enabled:!0},emailLabel:{enabled:!1,text:"Email"},header:{enabled:!1,text:"Wait! Before you go...",icon:{enabled:!0,selected:"https://cartstack-dialogs.s3.us-west-2.amazonaws.com/nudges/icons/Nudges_Icons-01.svg",color:"#FFFFFF",filter:"filter: invert(100%) sepia(0%) saturate(7500%) hue-rotate(146deg) brightness(121%) contrast(121%)"}},emailPlaceholder:"Enter your email address",dashedSection:{enabled:!0,text:"Use our PROMOCODE now for 20% off.",link:{enabled:!1,text:"Apply Coupon",url:"https://google.com",newTab:!0}}},displayConfig:{displayType:"all",displayTime:1,inclusions:[],exclusions:[],doNotShowAfter:null,showOnMobile:!1,animation:{enabled:!0,type:"fade",duration:"0.5s",delay:0,easing:"ease-in-out"},closeOnOverlayClick:!0},dialogHTMLReady:!0,dialogSuccessHTMLReady:!0,cssReady:!0,mode:"production"},wt="/build/assets/layout1-DaLh0wOA.png",u={headline_text:75,subheadline_text:175,button_text:20,success_text:75,success_body_text:175,header_text:50,form_field_placeholder_text:30,promo_text:140},Tt={"contentConfig.heading.text":"headline_text","contentConfig.body.text":"subheadline_text","contentConfig.buttonText":"button_text","contentConfig.heading.thankYouText":"success_text","contentConfig.body.thankYouText":"success_body_text","contentConfig.header.text":"header_text","contentConfig.emailPlaceholder":"form_field_placeholder_text","contentConfig.dashedSection.text":"promo_text"},Fe=C=>{const x=Tt[C];return x?u[x]:null},kt=(C,x)=>{const w=Fe(C);if(!w)return null;const V=(x||"").replace(/<\/?[^>]+(>|$)/g,"").length;return V>w?{field:C,currentLength:V,maxLength:w,message:`${V} of ${w} char.`}:null};z({heading:z({text:S().max(u.headline_text,`Headline must be ${u.headline_text} characters or less`).optional(),thankYouText:S().max(u.success_text,`Success headline must be ${u.success_text} characters or less`).optional()}).optional(),body:z({text:S().max(u.subheadline_text,`Sub-headline must be ${u.subheadline_text} characters or less`).optional(),thankYouText:S().max(u.success_body_text,`Success body must be ${u.success_body_text} characters or less`).optional()}).optional(),buttonText:S().max(u.button_text,`Button text must be ${u.button_text} characters or less`).optional(),header:z({text:S().max(u.header_text,`Header must be ${u.header_text} characters or less`).optional(),enabled:I().optional(),icon:z({enabled:I().optional()}).optional()}).optional(),emailPlaceholder:S().max(u.form_field_placeholder_text,`Email placeholder must be ${u.form_field_placeholder_text} characters or less`).optional(),dashedSection:z({text:S().max(u.promo_text,`Promo text must be ${u.promo_text} characters or less`).optional(),enabled:I().optional(),link:z({enabled:I().optional(),text:S().optional(),url:S().optional(),newTab:I().optional()}).optional()}).optional(),emailLabel:z({enabled:I().optional(),text:S().optional()}).optional()});const Pe=({css:C,html:x})=>{const w=r.useRef(null),Y=r.useRef(null);return r.useEffect(()=>{w.current&&(Y.current||(Y.current=w.current.attachShadow({mode:"open"})),Y.current.innerHTML=` 2 <style>${C}</style> 3 <div>${x}</div> 4 `)},[C,x]),e.jsx("div",{ref:w})},Pt=C=>{try{const x=JSON.parse(C);return x&&typeof x=="object"?x:(console.warn("Invalid config structure, falling back to sample data"),he)}catch(x){return console.error("Error parsing config JSON:",x),console.warn("Falling back to sample data"),he}},xs=({json:C,data:x,type:w,siteId:Y,beeToken:V,displayConditions:ze})=>{const Ye=r.useMemo(()=>C?Pt(C):(console.warn("No JSON config provided, using sample data"),he),[C]),[t,L]=r.useState(Ye),[_e,xe]=r.useState(x);r.useEffect(()=>{xe(x)},[x]);const[He,O]=r.useState(!1),[U,ue]=r.useState(!1),[q,ge]=r.useState(!1),Re=tt(["design","email-delivery"],"design"),[Ae,Me]=r.useState(Re),[X,Ie]=r.useState(!1),[c,b]=r.useState(null),E=r.useRef(null),[$,Ve]=r.useState(null),[me,Z]=r.useState(!1),B=r.useRef(null),[Ee,$e]=r.useState([]),[Be,ee]=r.useState(!1),[te,We]=r.useState(3),De=r.useMemo(()=>Array.from({length:39},(n,o)=>{const d=o+1;return`https://cartstack-dialogs.s3.us-west-2.amazonaws.com/nudges/icons/Nudges_Icons-${d<10?`0${d}`:`${d}`}.svg`}),[]),fe=r.useCallback(()=>{const n=[];[{path:"contentConfig.heading.text",value:t.contentConfig.heading.text},{path:"contentConfig.body.text",value:t.contentConfig.body.text},{path:"contentConfig.buttonText",value:t.contentConfig.buttonText},{path:"contentConfig.heading.thankYouText",value:t.contentConfig.heading.thankYouText},{path:"contentConfig.body.thankYouText",value:t.contentConfig.body.thankYouText},{path:"contentConfig.header.text",value:t.contentConfig.header.text},{path:"contentConfig.emailPlaceholder",value:t.contentConfig.emailPlaceholder},{path:"contentConfig.dashedSection.text",value:t.contentConfig.dashedSection?.text}
4].forEach(({path:d,value:y})=>{const j=kt(d,y);j&&n.push(j)}),$e(n)},[t.contentConfig]);r.useEffect(()=>{fe()},[t.contentConfig,fe]);const F=({fieldPath:n,value:o})=>{const d=Fe(n);if(!d)return null;const j=(o||"").replace(/<\/?[^>]+(>|$)/g,"").length;return j>d?e.jsxs("p",{className:"text-xs text-red-600 mt-1 font-medium",children:[j," of ",d," chars."]}):null},M=Ee.length>0,Le=de({mutationFn:({config:n,cartItemsCount:o})=>pt(n,o),onSuccess:n=>{Ve(n.template),Z(!1)},onError:n=>{console.error("Failed to load preview:",n),Z(!1)}});r.useEffect(()=>(Z(!0),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{Le.mutate({config:t,cartItemsCount:te})},10),()=>{B.current&&clearTimeout(B.current)}),[t,te]);const W=r.useRef(null);r.useEffect(()=>{const n=new IntersectionObserver(o=>{o.forEach(d=>{if(!X){const y=d.isIntersecting;E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{X||ue(y)},200)}})},{threshold:.5,rootMargin:"-100px 0px 0px 0px"});return W.current&&n.observe(W.current),()=>{W.current&&n.unobserve(W.current),E.current&&clearTimeout(E.current)}},[X]);const ne=de({mutationFn:()=>bt(Y),onSuccess:n=>{Q.success("Status updated."),L(o=>({...o,active:n.active}))},onError:n=>{console.error("Failed to toggle Send My Cart status:",n),Q.error("Failed to toggle Send My Cart status. Please try again.")}}),i=r.useCallback((n,o)=>{L(d=>{if(!d)return d;const y={...d};let j=y;for(let J=0;J<n.length-1;J++){const K=n[J];j[K]=j[K]?{...j[K]}:{},j=j[K]}return j[n[n.length-1]]=o,y}),O(!0)},[]),_=(n,o)=>o?`<u>${n}</u>`:n.replace(/<\/?u>/g,""),H=(n,o)=>o?`<i>${n}</i>`:n.replace(/<\/?i>/g,""),T=r.useMemo(()=>{const n=new Map;return(o,d)=>{const y=o.join(".");n.has(y)&&clearTimeout(n.get(y));const j=setTimeout(()=>{i(o,d),n.delete(y)},150);n.set(y,j)}},[i]),G=r.useMemo(()=>parseInt(t.styleConfig.popupProps.borderRadius)||0,[t.styleConfig.popupProps.borderRadius]),se=G===0,Oe=l(se?"opacity-50":""),Ue=r.useCallback(n=>{i(["styleConfig","popupProps","borderRadius"],`${n[0]}px`)},[i]),v=n=>{i(["swatches"],n)},pe=de({mutationFn:()=>jt(t),onSuccess:n=>{O(!1),ge(!0),console.log("Success:",n),Q.success("Configuration saved successfully!")},onError:n=>{console.error("Error saving config:",n),Q.error(n.message||"An error occurred while saving. Please try again.")}});r.useEffect(()=>{if(q){const n=setTimeout(()=>{ge(!1)},2e3);return()=>clearTimeout(n)}},[q]);const Ge=()=>{Ie(!0),ue(!U)},be=r.useMemo(()=>Array.from({length:23},(n,o)=>e.jsxs(s,{value:`${o+8}px`,children:[o+8,"px"]},o+8)),[]),Je=r.useMemo(()=>Array.from({length:53},(n,o)=>e.jsxs(s,{value:`${o+8}px`,children:[o+8,"px"]},o+8)),[]),Ke=r.useMemo(()=>Array.from({length:23},(n,o)=>e.jsxs(s,{value:`${o+8}px`,children:[o+8,"px"]},o+8)),[]),Qe=r.useMemo(()=>Array.from({length:33},(n,o)=>e.jsxs(s,{value:`${o+8}px`,children:[o+8,"px"]},o+8)),[]),qe=r.useMemo(()=>Array.from({length:13},(n,o)=>e.jsxs(s,{value:`${o+8}px`,children:[o+8,"px"]},o+8)),[]),Xe=r.useMemo(()=>Array.from({length:23},(n,o)=>e.jsxs(s,{value:`${o+8}px`,children:[o+8,"px"]},o+8)),[]),je=n=>{Me(n);const o=new URL(window.location.href);o.searchParams.set("tab",n),window.history.pushState({},"",o)};return e.jsxs(et,{children:[e.jsx(Ze,{title:"Send My Cart"}),e.jsx(yt,{featureType:"sendmycart"}),e.jsx(ft,{}),e.jsxs(at,{value:Ae,onValueChange:je,className:"w-full",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs(lt,{className:"w-fit",children:[e.jsx(Ce,{value:"design",children:"Design"}),e.jsx(Ce,{value:"email-delivery",children:"Email Delivery"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[ne.isPending?e.jsx("span",{className:"text-sm text-gray-500",children:"Loading..."}):e.jsx("span",{className:"text-sm text-gray-700",children:t.active?"Active":"Inactive"}),e.jsx(R,{checked:t.active,onCheckedChange:()=>ne.mutate(),disabled:ne.isPending})]})]}),e.jsxs(ye,{value:"design",children:[e.jsx("div",{className:"pb-20",children:e.jsx(rt,{children:e.jsx(le,{className:"p-0",children:e.jsxs("div",{className:"grid w-full md:grid-cols-[60%_40%]",children:[e.jsxs("div",{className:"flex flex-col bg-gray-300 p-4 sticky top-0 self-start min-h-screen",children:[e.jsxs(nt,{variant:"outline",className:"absolute right-3 top-3 z-10 bg-white",children:[e.jsx(vt,{className:"w-4 h-4 mr-1"}),"Preview"]}),e.jsxs("div",{className:"flex-1 mt-16",children:[me&&e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(mt,{className:"w-8 h-8 mb-2"})}),!me&&$&&e.jsxs(e.Fragment,{children:[!U&&e.jsx("div",{className:"py-12",children:e.jsx(le,{children:e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"w-full max-w-[780px]",children:e.jsx(Pe,{css:$.css,html:$.main_html})})})})}),U&&e.jsx("div",{className:"py-12",children:e.jsx(le,{children:e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"w-full max-w-[580px]",children:e.jsx(Pe,{css:$.css,html:$.success_html})})})})})]})]}),M&&e.jsx("div",{className:"bg-red-50 border border-red-300 rounded-lg p-4 mx-4 mb-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Te,{className:"w-5 h-5 text-red-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-red-800 font-medium",children:"Warning! You have exceeded the maximum number or characters on one or more field. Please correct these errors before saving."})]})})]}),e.jsxs("div",{className:"flex flex-col p-4 md:p-6 ",children:[e.jsx("h1",{className:"text-page-heading font-semibold mb-6 sr-only",children:"Send My Cart"}),e.jsxs(it,{type:"single",collapsible:!0,className:"w-full",defaultValue:"content-styles",children:[e.jsxs(ie,{value:"layout",className:"border-b",children:[e.jsxs(oe,{className:"hover:no-underline justify-start gap-3",children:[e.jsx(re,{className:"bg-green-600 w-4 h-4"}),"Layout"]}),e.jsx(ae,{children:e.jsx("div",{className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4",children:e.jsxs("div",{className:"flex justify-start",children:[e.jsx("img",{src:wt,alt:"Send My Cart Layout",className:"w-1/2"}),e.jsx(Nt,{className:"h-5 w-5 absolute text-green-600 mr-2"})]})})})]}),e.jsxs(ie,{value:"content-styles",className:"border-b",children:[e.jsxs(oe,{className:"hover:no-underline justify-start gap-3",children:[e.jsx(re,{className:"bg-green-600 w-4 h-4"}),"Content & Styles"]}),e.jsx(ae,{children:e.jsxs("div",{className:"grid gap-6 px-1 pt-3 mb-10",children:[e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4 space-y-4",children:[e.jsx("h3",{className:"font-bold",children:"Header Section:"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{htmlFor:"header-on-off",children:"Header"}),e.jsx(R,{id:"header-on-off",checked:t.contentConfig.header.enabled,onCheckedChange:n=>i(["contentConfig","header","enabled"],n)})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{htmlFor:"header-icon",children:"Include Icon"}),e.jsxs("div",{className:"flex items-center gap-2",children:[t.contentConfig.header.icon.enabled&&t.contentConfig.header.enabled&&e.jsxs(e.Fragment,{children:[e.jsx(a,{variant:"outline",size:"icon",onClick:()=>ee(!0),title:"Select icon",children:e.jsx("img",{src:t.contentConfig.header.icon.selected,alt:"Selected icon",className:"w-5 h-5",style:{filter:t.contentConfig.header.icon.filter?t.contentConfig.header.icon.filter.replace("filter: ",""):void 0}})}),e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t.contentConfig.header.icon.color||"#000000",setColor:n=>{const o=gt(n);L(d=>({...d,contentConfig:{...d.contentConfig,header:{...d.contentConfig.header,icon:{...d.contentConfig.header.icon,color:n,filter:o}}}})),O(!0)},onSwatchesSave:v})})]}),e.jsx(R,{id:"header-icon",checked:t.contentConfig.header.icon.enabled,disabled:!t.contentConfig.header.enabled,onCheckedChange:n=>i(["contentConfig","header","icon","enabled"],n)})]})]}),e.jsx(ct,{open:Be,onOpenChange:ee,children:e.jsxs(dt,{className:"max-w-2xl",children:[e.jsxs(ht,{children:[e.jsx(xt,{children:"Select an Icon"}),e.jsx(ut,{children:"Choose an icon to display in the header section."})]}),e.jsx("div",{className:"grid grid-cols-7 gap-3 max-h-[400px] overflow-y-auto p-2",children:De.map(n=>e.jsx("button",{type:"button",onClick:()=>{i(["contentConfig","header","icon","selected"],n),ee(!1)},className:l("p-3 rounded-lg border-2 hover:border-gray-400 hover:bg-gray-50 transition-all",t.contentConfig.header.icon.selected===n?"border-blue-500 bg-blue-50":"border-transparent"),children:e.jsx("img",{src:n,alt:"Icon option",className:"w-10 h-10 mx-auto"})},n))})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{htmlFor:"header-background-color",children:"Backgroun
4d Color"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.headerProps.backgroundColor||"#ffffff",setColor:n=>T(["styleConfig","headerProps","backgroundColor"],n),onSwatchesSave:v})}),e.jsx("span",{className:"text-sm text-muted-foreground",children:t?.styleConfig.headerProps.backgroundColor||"#ffffff"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"header-text",children:"Header Text:"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(D,{type:"text",id:"header-text",placeholder:"Send My Cart, Please!",value:t.contentConfig.header.text.replace(/<\/?[^>]+(>|$)/g,""),disabled:!t.contentConfig.header.enabled,onChange:n=>i(["contentConfig","header","text"],n),className:"bg-white"}),e.jsx(F,{fieldPath:"contentConfig.header.text",value:t.contentConfig.header.text})]}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(a,{variant:"ghost",disabled:!t.contentConfig.header.enabled,onClick:()=>b(c==="contentConfig.header.text"?null:"contentConfig.header.text"),className:l(c==="contentConfig.header.text"?"bg-blue-50 border-blue-300 border rounded-md":"",""),children:e.jsx(A,{className:l(c==="contentConfig.header.text"?"text-blue-500 hover:text-blue-700":"text-gray-600 hover:text-gray-900","w-6 h-6 transition-all ease-in-out")})})})]}),e.jsx(k,{children:c==="contentConfig.header.text"&&e.jsx(P.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1,overflow:"visible"},exit:{height:0,opacity:0},transition:{type:"spring",stiffness:200,damping:30,duration:.3},style:{overflow:"hidden"},children:e.jsxs("div",{className:"flex flex-wrap gap-4 items-center py-3 bg-blue-50 border-blue-300 border p-5 rounded-md",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Text Styles"}),e.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.headerProps.textColor||"#000000",setColor:n=>T(["styleConfig","headerProps","textColor"],n),onSwatchesSave:v})}),e.jsx(a,{className:l(t.styleConfig.headerProps.fontWeight==="bold"?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",disabled:!t.contentConfig.header.enabled,title:"Bold",onClick:()=>i(["styleConfig","headerProps","fontWeight"],t.styleConfig.headerProps.fontWeight==="400"?"bold":"400"),children:e.jsx("span",{className:"font-bold",children:"B"})}),e.jsx(a,{className:l(t.contentConfig.header.text.includes("<i>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",disabled:!t.contentConfig.header.enabled,title:"Italic",onClick:()=>i(["contentConfig","header","text"],H(t.contentConfig.header.text,!t.contentConfig.header.text.includes("<i>"))),children:e.jsx("span",{className:"italic",children:"I"})}),e.jsx(a,{className:l(t.contentConfig.header.text.includes("<u>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",disabled:!t.contentConfig.header.enabled,title:"Underline",onClick:()=>i(["contentConfig","header","text"],_(t.contentConfig.header.text,!t.contentConfig.header.text.includes("<u>"))),children:e.jsx("span",{className:"underline",children:"U"})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Header Font"}),e.jsxs(g,{disabled:!t.contentConfig.header.enabled,value:t.styleConfig.headerProps.fontFamily,onValueChange:n=>i(["styleConfig","headerProps","fontFamily"],n),children:[e.jsx(m,{id:"header-font",className:"bg-white min-w-[140px]",children:e.jsx(f,{placeholder:"Select font"})}),e.jsxs(p,{children:[e.jsx(s,{value:"Arial",children:"Arial"}),e.jsx(s,{value:"Verdana",children:"Verdana"}),e.jsx(s,{value:"Tahoma",children:"Tahoma"}),e.jsx(s,{value:"Trebuchet MS",children:"Trebuchet"}),e.jsx(s,{value:"Times New Roman",children:"Times New Roman"}),e.jsx(s,{value:"Helvetica",children:"Helvetica"}),e.jsx(s,{value:"Courier New",children:"Courier"}),e.jsx(s,{value:"Georgia",children:"Georgia"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Size"}),e.jsxs(g,{disabled:!t.contentConfig.header.enabled,value:t.styleConfig.headerProps.fontSize,onValueChange:n=>i(["styleConfig","headerProps","fontSize"],n),children:[e.jsx(m,{id:"header-size",className:"bg-white min-w-[100px]",children:e.jsx(f,{placeholder:"Select size"})}),e.jsx(p,{children:be})]})]})]})})})]})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4 space-y-4",children:[e.jsx("h3",{className:"font-bold",children:"Body Section:"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{htmlFor:"body-background-color",children:"Backgroun
4d Color"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.popupProps.backgroundColor||"#FFFFFF",setColor:n=>T(["styleConfig","popupProps","backgroundColor"],n),onSwatchesSave:v})}),e.jsx("span",{className:"text-sm text-muted-foreground",children:t?.styleConfig.popupProps.backgroundColor||"#FFFFFF"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"headline-text",children:"Headline Text:"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(D,{type:"text",id:"headline-text",placeholder:"Send Your Stay",value:t.contentConfig.heading.text.replace(/<\/?[^>]+(>|$)/g,""),onChange:n=>i(["contentConfig","heading","text"],n),className:"bg-white"}),e.jsx(F,{fieldPath:"contentConfig.heading.text",value:t.contentConfig.heading.text})]}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(a,{variant:"ghost",onClick:()=>b(c==="contentConfig.heading.text"?null:"contentConfig.heading.text"),className:l(c==="contentConfig.heading.text"?"bg-blue-50 border-blue-300 border rounded-md":"",""),children:e.jsx(A,{className:l(c==="contentConfig.heading.text"?"text-blue-500 hover:text-blue-700":"text-gray-600 hover:text-gray-900","w-6 h-6 transition-all ease-in-out")})})})]}),e.jsx(k,{children:c==="contentConfig.heading.text"&&e.jsx(P.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1,overflow:"visible"},exit:{height:0,opacity:0},transition:{type:"spring",stiffness:200,damping:30,duration:.3},style:{overflow:"hidden"},children:e.jsxs("div",{className:"flex flex-wrap gap-4 items-center py-3 bg-blue-50 border-blue-300 border p-5 rounded-md",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Text Styles"}),e.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.headingProps.textColor||"#000000",setColor:n=>T(["styleConfig","headingProps","textColor"],n),onSwatchesSave:v})}),e.jsx(a,{className:l(t.styleConfig.headingProps.fontWeight==="bold"?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Bold",onClick:()=>i(["styleConfig","headingProps","fontWeight"],t.styleConfig.headingProps.fontWeight==="400"?"bold":"400"),children:e.jsx("span",{className:"font-bold",children:"B"})}),e.jsx(a,{className:l(t.contentConfig.heading.text.includes("<i>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Italic",onClick:()=>i(["contentConfig","heading","text"],H(t.contentConfig.heading.text,!t.contentConfig.heading.text.includes("<i>"))),children:e.jsx("span",{className:"italic",children:"I"})}),e.jsx(a,{className:l(t.contentConfig.heading.text.includes("<u>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Underline",onClick:()=>i(["contentConfig","heading","text"],_(t.contentConfig.heading.text,!t.contentConfig.heading.text.includes("<u>"))),children:e.jsx("span",{className:"underline",children:"U"})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Headline Font"}),e.jsxs(g,{value:t.styleConfig.headingProps.fontFamily,onValueChange:n=>i(["styleConfig","headingProps","fontFamily"],n),children:[e.jsx(m,{id:"headline-font",className:"bg-white min-w-[140px]",children:e.jsx(f,{placeholder:"Select font"})}),e.jsxs(p,{children:[e.jsx(s,{value:"Arial",children:"Arial"}),e.jsx(s,{value:"Verdana",children:"Verdana"}),e.jsx(s,{value:"Tahoma",children:"Tahoma"}),e.jsx(s,{value:"Trebuchet MS",children:"Trebuchet"}),e.jsx(s,{value:"Times New Roman",children:"Times New Roman"}),e.jsx(s,{value:"Helvetica",children:"Helvetica"}),e.jsx(s,{value:"Courier New",children:"Courier"}),e.jsx(s,{value:"Georgia",children:"Georgia"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Size"}),e.jsxs(g,{value:t.styleConfig.headingProps.fontSize,onValueChange:n=>i(["styleConfig","headingProps","fontSize"],n),children:[e.jsx(m,{id:"headline-size",className:"bg-white min-w-[100px]",children:e.jsx(f,{placeholder:"Select size"})}),e.jsx(p,{children:Je})]})]})]})})})]}),e.jsxs("div",{className:"space-y-2 pt-5",children:[e.jsx(h,{htmlFor:"subheadline-text",children:"Subheadline Text:"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(ce,{value:t.contentConfig.body.text.replace(/<\/?[^>]+(>|$)/g,"").trim(),onChange:n=>i(["contentConfig","body","text"],n),placeholder:"Send yourself an email with your booking details, in case you're unable to complete your booking now. See you at our property soon!",id:"subheadline-text",rows:5,className:"bg-white"}),e.jsx(F,{fieldPath:"contentConfig.body.text",value:t.contentConfig.body.text})]}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(a,{variant:"ghost",onClick:()=>b(c==="contentConfig.body.text"?null:"contentConfig.body.text"),className:l(c==="contentConfig.body.text"?"bg-blue-50 border-blue-300 border rounded-md":"",""),children:e.jsx(A,{className:l(c==="contentConfig.body.text"?"text-blue-500 hover:text-blue-700":"text-gray-600 hover:text-gray-900","w-6 h-6 transition-all ease-in-out")})})})]}),e.jsx(k,{children:c==="contentConfig.body.text"&&e.jsx(P.div,{initial:{height:0,opacity:0}
4,animate:{height:"auto",opacity:1,overflow:"visible"},exit:{height:0,opacity:0},transition:{type:"spring",stiffness:200,damping:30,duration:.3},style:{overflow:"hidden"},children:e.jsxs("div",{className:"flex flex-wrap gap-4 items-center py-3 bg-blue-50 border-blue-300 border p-5 rounded-md",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Text Styles"}),e.jsxs("div",{className:"flex space-x-2 items-center",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.textProps.textColor||"#000000",setColor:n=>T(["styleConfig","textProps","textColor"],n),onSwatchesSave:v})}),e.jsx(a,{className:l(t.styleConfig.textProps.fontWeight==="bold"?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Bold",onClick:()=>i(["styleConfig","textProps","fontWeight"],t.styleConfig.textProps.fontWeight==="400"?"bold":"400"),children:e.jsx("span",{className:"font-bold",children:"B"})}),e.jsx(a,{className:l(t.contentConfig.body.text.includes("<i>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Italic",onClick:()=>i(["contentConfig","body","text"],H(t.contentConfig.body.text,!t.contentConfig.body.text.includes("<i>"))),children:e.jsx("span",{className:"italic",children:"I"})}),e.jsx(a,{className:l(t.contentConfig.body.text.includes("<u>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Underline",onClick:()=>i(["contentConfig","body","text"],_(t.contentConfig.body.text,!t.contentConfig.body.text.includes("<u>"))),children:e.jsx("span",{className:"underline",children:"U"})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Subheadline Font"}),e.jsxs(g,{value:t.styleConfig.textProps.fontFamily,onValueChange:n=>i(["styleConfig","textProps","fontFamily"],n),children:[e.jsx(m,{id:"subheadline-font",className:"bg-white min-w-[140px]",children:e.jsx(f,{placeholder:"Select font"})}),e.jsxs(p,{children:[e.jsx(s,{value:"Arial",children:"Arial"}),e.jsx(s,{value:"Verdana",children:"Verdana"}),e.jsx(s,{value:"Tahoma",children:"Tahoma"}),e.jsx(s,{value:"Trebuchet MS",children:"Trebuchet"}),e.jsx(s,{value:"Times New Roman",children:"Times New Roman"}),e.jsx(s,{value:"Helvetica",children:"Helvetica"}),e.jsx(s,{value:"Courier New",children:"Courier"}),e.jsx(s,{value:"Georgia",children:"Georgia"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Size"}),e.jsxs(g,{value:t.styleConfig.textProps.fontSize,onValueChange:n=>i(["styleConfig","textProps","fontSize"],n),children:[e.jsx(m,{id:"subheadline-size",className:"bg-white min-w-[100px]",children:e.jsx(f,{placeholder:"Select size"})}),e.jsx(p,{children:Ke})]})]})]})})})]})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4 space-y-4",children:[e.jsx("h3",{className:"font-bold",children:"Form Section:"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"form-placeholder",children:"Form Field Placeholder Text:"}),e.jsx(D,{type:"text",id:"form-placeholder",value:t.contentConfig.emailPlaceholder.replace(/<\/?[^>]+(>|$)/g,""),onChange:n=>i(["contentConfig","emailPlaceholder"],n),placeholder:"Enter your email address",className:"bg-white"}),e.jsx(F,{fieldPath:"contentConfig.emailPlaceholder",value:t.contentConfig.emailPlaceholder})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(h,{htmlFor:"button-color",children:"Button Color"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.buttonProps.backgroundColor||"#000000",setColor:n=>T(["styleConfig","buttonProps","backgroundColor"],n),onSwatchesSave:v})}),e.jsx("span",{className:"text-sm text-muted-foreground",children:t?.styleConfig.buttonProps.backgroundColor||"#000000"})]})]}),e.jsx(h,{htmlFor:"button-text",children:"Button Text:"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(D,{type:"text",id:"button-text",placeholder:"Send My Cart",value:t.contentConfig.buttonText.replace(/<\/?[^>]+(>|$)/g,""),onChange:n=>i(["contentConfig","buttonText"],n),className:"bg-white"}),e.jsx(F,{fieldPath:"contentConfig.buttonText",value:t.contentConfig.buttonText})]}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(a,{variant:"ghost",onClick:()=>b(c==="contentConfig.buttonText"?null:"contentConfig.buttonText"),className:l(c==="contentConfig.buttonText"?"bg-blue-50 border-blue-300 border rounded-md":"",""),children:e.jsx(A,{className:l(c==="contentConfig.buttonText"?"text-blue-500 hover:text-blue-700":"text-gray-600 hover:text-gray-900","w-6 h-6 transition-all ease-in-out")})})})]}),e.jsx(k,{children:c==="contentConfig.buttonText"&&e.jsx(P.div,{initial:{height:0,opacity:0}
4,animate:{height:"auto",opacity:1,overflow:"visible"},exit:{height:0,opacity:0},transition:{type:"spring",stiffness:200,damping:30,duration:.3},style:{overflow:"hidden"},children:e.jsxs("div",{className:"flex flex-wrap gap-4 items-center py-3 bg-blue-50 border-blue-300 border p-5 rounded-md",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Text Styles"}),e.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.buttonProps.textColor||"#000000",setColor:n=>T(["styleConfig","buttonProps","textColor"],n),onSwatchesSave:v})}),e.jsx(a,{className:l(t.styleConfig.buttonProps.fontWeight==="bold"?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Bold",onClick:()=>i(["styleConfig","buttonProps","fontWeight"],t.styleConfig.buttonProps.fontWeight==="400"?"bold":"400"),children:e.jsx("span",{className:"font-bold",children:"B"})}),e.jsx(a,{className:l(t.contentConfig.buttonText.includes("<i>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Italic",onClick:()=>i(["contentConfig","buttonText"],H(t.contentConfig.buttonText,!t.contentConfig.buttonText.includes("<i>"))),children:e.jsx("span",{className:"italic",children:"I"})}),e.jsx(a,{className:l(t.contentConfig.buttonText.includes("<u>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Underline",onClick:()=>i(["contentConfig","buttonText"],_(t.contentConfig.buttonText,!t.contentConfig.buttonText.includes("<u>"))),children:e.jsx("span",{className:"underline",children:"U"})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Button Font"}),e.jsxs(g,{value:t.styleConfig.buttonProps.fontFamily,onValueChange:n=>i(["styleConfig","buttonProps","fontFamily"],n),children:[e.jsx(m,{id:"button-font",className:"bg-white min-w-[140px]",children:e.jsx(f,{placeholder:"Select font"})}),e.jsxs(p,{children:[e.jsx(s,{value:"Arial",children:"Arial"}),e.jsx(s,{value:"Verdana",children:"Verdana"}),e.jsx(s,{value:"Tahoma",children:"Tahoma"}),e.jsx(s,{value:"Trebuchet MS",children:"Trebuchet"}),e.jsx(s,{value:"Times New Roman",children:"Times New Roman"}),e.jsx(s,{value:"Helvetica",children:"Helvetica"}),e.jsx(s,{value:"Courier New",children:"Courier"}),e.jsx(s,{value:"Georgia",children:"Georgia"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Size"}),e.jsxs(g,{value:t.styleConfig.buttonProps.fontSize,onValueChange:n=>i(["styleConfig","buttonProps","fontSize"],n),children:[e.jsx(m,{id:"button-size",className:"bg-white min-w-[100px]",children:e.jsx(f,{placeholder:"Select size"})}),e.jsx(p,{children:Qe})]})]})]})})})]})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4 space-y-4",children:[e.jsx("h3",{className:"font-bold",children:"Promo Section:"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{htmlFor:"include-promo",children:"Include Promo Area Text"}),e.jsx(R,{id:"include-promo",checked:t.contentConfig.dashedSection.enabled,onCheckedChange:n=>i(["contentConfig","dashedSection","enabled"],n)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"promo-text",children:"Promo Area Text:"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(ce,{placeholder:"We'll send you future promotions too!",value:t.contentConfig.dashedSection.text,disabled:!t.contentConfig.dashedSection.enabled,onChange:n=>i(["contentConfig","dashedSection","text"],n),id:"promo-text",rows:5,className:"bg-white"}),e.jsx(F,{fieldPath:"contentConfig.dashedSection.text",value:t.contentConfig.dashedSection.text})]}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(a,{variant:"ghost",disabled:!t.contentConfig.dashedSection.enabled,onClick:()=>b(c==="contentConfig.dashedSection.text"?null:"contentConfig.dashedSection.text"),className:l(c==="contentConfig.dashedSection.text"?"bg-blue-50 border-blue-300 border rounded-md":"",""),children:e.jsx(A,{className:l(c==="contentConfig.dashedSection.text"?"text-blue-500 hover:text-blue-700":"text-gray-600 hover:text-gray-900","w-6 h-6 transition-all ease-in-out")})})})]}),e.jsx(k,{children:c==="contentConfig.dashedSection.text"&&e.jsx(P.div,{initial:{height:0,opacity:0}
4,animate:{height:"auto",opacity:1,overflow:"visible"},exit:{height:0,opacity:0},transition:{type:"spring",stiffness:200,damping:30,duration:.3},style:{overflow:"hidden"},children:e.jsxs("div",{className:"flex flex-wrap gap-4 items-center py-3 bg-blue-50 border-blue-300 border p-5 rounded-md",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Text Styles"}),e.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.dashedSectionProps.textColor||"#000000",setColor:n=>T(["styleConfig","dashedSectionProps","textColor"],n),onSwatchesSave:v})}),e.jsx(a,{className:l(t.styleConfig.dashedSectionProps.fontWeight==="bold"?"bg-gray-200 border-gray-400":""),variant:"outline",disabled:!t.contentConfig.dashedSection.enabled,size:"icon",title:"Bold",onClick:()=>i(["styleConfig","dashedSectionProps","fontWeight"],t.styleConfig.dashedSectionProps.fontWeight==="400"?"bold":"400"),children:e.jsx("span",{className:"font-bold",children:"B"})}),e.jsx(a,{className:l(t.contentConfig.dashedSection.text.includes("<i>")?"bg-gray-200 border-gray-400":""),variant:"outline",disabled:!t.contentConfig.dashedSection.enabled,size:"icon",title:"Italic",onClick:()=>i(["contentConfig","dashedSection","text"],H(t.contentConfig.dashedSection.text,!t.contentConfig.dashedSection.text.includes("<i>"))),children:e.jsx("span",{className:"italic",children:"I"})}),e.jsx(a,{className:l(t.contentConfig.dashedSection.text.includes("<u>")?"bg-gray-200 border-gray-400":""),variant:"outline",disabled:!t.contentConfig.dashedSection.enabled,size:"icon",title:"Underline",onClick:()=>i(["contentConfig","dashedSection","text"],_(t.contentConfig.dashedSection.text,!t.contentConfig.dashedSection.text.includes("<u>"))),children:e.jsx("span",{className:"underline",children:"U"})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Promo Area Font"}),e.jsxs(g,{disabled:!t.contentConfig.dashedSection.enabled,value:t.styleConfig.dashedSectionProps.fontFamily,onValueChange:n=>i(["styleConfig","dashedSectionProps","fontFamily"],n),children:[e.jsx(m,{id:"promo-font",className:"bg-white min-w-[140px]",children:e.jsx(f,{placeholder:"Select font"})}),e.jsxs(p,{children:[e.jsx(s,{value:"Arial",children:"Arial"}),e.jsx(s,{value:"Verdana",children:"Verdana"}),e.jsx(s,{value:"Tahoma",children:"Tahoma"}),e.jsx(s,{value:"Trebuchet MS",children:"Trebuchet"}),e.jsx(s,{value:"Times New Roman",children:"Times New Roman"}),e.jsx(s,{value:"Helvetica",children:"Helvetica"}),e.jsx(s,{value:"Courier New",children:"Courier"}),e.jsx(s,{value:"Georgia",children:"Georgia"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Size"}),e.jsxs(g,{disabled:!t.contentConfig.dashedSection.enabled,value:t.styleConfig.dashedSectionProps.fontSize,onValueChange:n=>i(["styleConfig","dashedSectionProps","fontSize"],n),children:[e.jsx(m,{id:"promo-size",className:"bg-white min-w-[100px]",children:e.jsx(f,{placeholder:"Select size"})}),e.jsx(p,{children:qe})]})]})]})})})]})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4 space-y-4",children:[e.jsx("h3",{className:"font-bold",children:"Modal Options:"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{htmlFor:"rounded-corners",children:"Rounded Corners"}),e.jsx(R,{id:"rounded-corners",checked:!se,onCheckedChange:n=>{n?i(["styleConfig","popupProps","borderRadius"],`${G===0?16:G}px`):i(["styleConfig","popupProps","borderRadius"],"0")}})]}),e.jsxs("div",{className:"space-y-2 flex items-center gap-2 ms-6 pb-3",children:[e.jsx(h,{className:"pt-2",htmlFor:"radius",children:"Radius"}),e.jsx(st,{className:Oe,id:"radius",min:0,max:40,step:1,value:[G],disabled:se,onValueChange:Ue})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(h,{htmlFor:"include-overlay",children:"Include Overlay"}
4),e.jsx(ve,{delayDuration:0,children:e.jsxs(Ne,{children:[e.jsx(Se,{asChild:!0,children:e.jsx(ke,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(we,{children:e.jsx("p",{children:"Choosing this option will darken the background behind your offer, in order to bring more attention to it."})})]})})]}),e.jsx(R,{id:"include-overlay",checked:t.styleConfig.overlayProps.backgroundColor!=="transparent",onCheckedChange:n=>n?i(["styleConfig","overlayProps","backgroundColor"],"#0000008c"):i(["styleConfig","overlayProps","backgroundColor"],"transparent")})]})]}),e.jsxs("div",{ref:W,className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4 space-y-4",children:[e.jsx("h3",{className:"font-bold",children:"Success Section:"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"success-headline",children:"Headline Text:"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(D,{type:"text",id:"success-headline",placeholder:"Thank You...",value:t.contentConfig.heading.thankYouText.replace(/<\/?[^>]+(>|$)/g,""),onChange:n=>i(["contentConfig","heading","thankYouText"],n),className:"bg-white"}),e.jsx(F,{fieldPath:"contentConfig.heading.thankYouText",value:t.contentConfig.heading.thankYouText})]}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(a,{variant:"ghost",onClick:()=>b(c==="contentConfig.heading.thankYouText"?null:"contentConfig.heading.thankYouText"),className:l(c==="contentConfig.heading.thankYouText"?"bg-blue-50 border-blue-300 border rounded-md":"",""),children:e.jsx(A,{className:l(c==="contentConfig.heading.thankYouText"?"text-blue-500 hover:text-blue-700":"text-gray-600 hover:text-gray-900","w-6 h-6 transition-all ease-in-out")})})})]}),e.jsx(k,{children:c==="contentConfig.heading.thankYouText"&&e.jsx(P.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1,overflow:"visible"},exit:{height:0,opacity:0},transition:{type:"spring",stiffness:200,damping:30,duration:.3},style:{overflow:"hidden"},children:e.jsxs("div",{className:"flex flex-wrap gap-4 items-center py-3 bg-blue-50 border-blue-300 border p-5 rounded-md",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Text Styles"}),e.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.thankYouHeadingProps.textColor||"#000000",setColor:n=>T(["styleConfig","thankYouHeadingProps","textColor"],n),onSwatchesSave:v})}),e.jsx(a,{className:l(t.styleConfig.thankYouHeadingProps.fontWeight==="bold"?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Bold",onClick:()=>i(["styleConfig","thankYouHeadingProps","fontWeight"],t.styleConfig.thankYouHeadingProps.fontWeight==="400"?"bold":"400"),children:e.jsx("span",{className:"font-bold",children:"B"})}),e.jsx(a,{className:l(t.contentConfig.heading.thankYouText.includes("<i>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Italic",onClick:()=>i(["contentConfig","heading","thankYouText"],H(t.contentConfig.heading.thankYouText,!t.contentConfig.heading.thankYouText.includes("<i>"))),children:e.jsx("span",{className:"italic",children:"I"})}),e.jsx(a,{className:l(t.contentConfig.heading.thankYouText.includes("<u>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Underline",onClick:()=>i(["contentConfig","heading","thankYouText"],_(t.contentConfig.heading.thankYouText,!t.contentConfig.heading.thankYouText.includes("<u>"))),children:e.jsx("span",{className:"underline",children:"U"})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Headline Font"}),e.jsxs(g,{value:t.styleConfig.thankYouHeadingProps.fontFamily,onValueChange:n=>i(["styleConfig","thankYouHeadingProps","fontFamily"],n),children:[e.jsx(m,{id:"success-headline-font",className:"bg-white min-w-[140px]",children:e.jsx(f,{placeholder:"Select font"})}),e.jsxs(p,{children:[e.jsx(s,{value:"Arial",children:"Arial"}),e.jsx(s,{value:"Verdana",children:"Verdana"}),e.jsx(s,{value:"Tahoma",children:"Tahoma"}),e.jsx(s,{value:"Trebuchet MS",children:"Trebuchet"}),e.jsx(s,{value:"Times New Roman",children:"Times New Roman"}),e.jsx(s,{value:"Helvetica",children:"Helvetica"}),e.jsx(s,{value:"Courier New",children:"Courier"}),e.jsx(s,{value:"Georgia",children:"Georgia"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Size"}),e.jsxs(g,{value:t.styleConfig.thankYouHeadingProps.fontSize,onValueChange:n=>i(["styleConfig","thankYouHeadingProps","fontSize"],n),children:[e.jsx(m,{id:"success-headline-size",className:"bg-white min-w-[100px]",children:e.jsx(f,{placeholder:"Select size"})}),e.jsx(p,{children:be})]})]})]})})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"success-subheadline",children:"Subheadline Text:"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(ce,{placeholder:"Please check your email inbox for the details of your booking reservation.",id:"success-subheadline",value:t.contentConfig.body.thankYouText.replace(/<\/?[^>]+(>|$)/g,""),onChange:n=>i(["contentConfig","body","thankYouText"],n),rows:5,className:"bg-white"}),e.jsx(F,{fieldPath:"contentConfig.body.thankYouText",value:t.contentConfig.body.thankYouText})]}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(a,{variant:"ghost",onClick:()=>b(c==="contentConfig.body.thankYouText"?null:"contentConfig.body.thankYouText"),className:l(c==="contentConfig.body.thankYouText"?"bg-blue-50 border-blue-300 border rounded-md":"",""),children:e.jsx(A,{className:l(c==="contentConfig.body.thankYouText"?"text-blue-500 hover:text-blue-700":"text-gray-600 hover:text-gray-900","w-6 h-6 transition-all ease-in-out")})})})]}),e.jsx(k,{children:c==="contentConfig.body.thankYouText"&&e.jsx(P.div,{initial:{height:0,opacity:0}
4,animate:{height:"auto",opacity:1,overflow:"visible"},exit:{height:0,opacity:0},transition:{type:"spring",stiffness:200,damping:30,duration:.3},style:{overflow:"hidden"},children:e.jsxs("div",{className:"flex flex-wrap gap-4 items-center py-3 bg-blue-50 border-blue-300 border p-5 rounded-md",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Text Styles"}),e.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[e.jsx(a,{variant:"outline",size:"icon",children:e.jsx(N,{swatches:t?.swatches,color:t?.styleConfig.thankYouTextProps.textColor||"#000000",setColor:n=>T(["styleConfig","thankYouTextProps","textColor"],n),onSwatchesSave:v})}),e.jsx(a,{className:l(t.styleConfig.thankYouTextProps.fontWeight==="bold"?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Bold",onClick:()=>i(["styleConfig","thankYouTextProps","fontWeight"],t.styleConfig.thankYouTextProps.fontWeight==="400"?"bold":"400"),children:e.jsx("span",{className:"font-bold",children:"B"})}),e.jsx(a,{className:l(t.contentConfig.body.thankYouText.includes("<i>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Italic",onClick:()=>i(["contentConfig","body","thankYouText"],H(t.contentConfig.body.thankYouText,!t.contentConfig.body.thankYouText.includes("<i>"))),children:e.jsx("span",{className:"italic",children:"I"})}),e.jsx(a,{className:l(t.contentConfig.body.thankYouText.includes("<u>")?"bg-gray-200 border-gray-400":""),variant:"outline",size:"icon",title:"Underline",onClick:()=>i(["contentConfig","body","thankYouText"],_(t.contentConfig.body.thankYouText,!t.contentConfig.body.thankYouText.includes("<u>"))),children:e.jsx("span",{className:"underline",children:"U"})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Subheadline Font"}),e.jsxs(g,{value:t.styleConfig.thankYouTextProps.fontFamily,onValueChange:n=>i(["styleConfig","thankYouTextProps","fontFamily"],n),children:[e.jsx(m,{id:"success-subheadline-font",className:"bg-white min-w-[140px]",children:e.jsx(f,{placeholder:"Select font"})}),e.jsxs(p,{children:[e.jsx(s,{value:"Arial",children:"Arial"}),e.jsx(s,{value:"Verdana",children:"Verdana"}),e.jsx(s,{value:"Tahoma",children:"Tahoma"}),e.jsx(s,{value:"Trebuchet MS",children:"Trebuchet"}),e.jsx(s,{value:"Times New Roman",children:"Times New Roman"}),e.jsx(s,{value:"Helvetica",children:"Helvetica"}),e.jsx(s,{value:"Courier New",children:"Courier"}),e.jsx(s,{value:"Georgia",children:"Georgia"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 font-medium",children:"Size"}),e.jsxs(g,{value:t.styleConfig.thankYouTextProps.fontSize,onValueChange:n=>i(["styleConfig","thankYouTextProps","fontSize"],n),children:[e.jsx(m,{id:"success-subheadline-size",className:"bg-white min-w-[100px]",children:e.jsx(f,{placeholder:"Select size"})}),e.jsx(p,{children:Xe})]})]})]})})})]})]})]})})]}),e.jsxs(ie,{value:"additional-settings",className:"border-b",children:[e.jsxs(oe,{className:"hover:no-underline justify-start gap-3",children:[e.jsx(re,{className:"bg-green-600 w-4 h-4"}),"Additional Settings"]}),e.jsx(ae,{children:e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(h,{htmlFor:"clickOverlay",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Click Overlay to Close"}),e.jsx(ve,{delayDuration:0,children:e.jsxs(Ne,{children:[e.jsx(Se,{asChild:!0,children:e.jsx(ke,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(we,{children:e.jsx("p",{children:"Choosing this option will allow your visitors to click the darkened background in order to close the popup."})})]})})]}),e.jsx(R,{id:"clickOverlay"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{htmlFor:"animationStyle",className:"text-sm font-medium",children:"Animation Style"}),e.jsxs(g,{value:t.displayConfig.animation.enabled?t.displayConfig.animation.type:"none",onValueChange:n=>{n==="none"?i(["displayConfig","animation","enabled"],!1):(L(o=>({...o,displayConfig:{...o.displayConfig,animation:{...o.displayConfig.animation,enabled:!0,type:n}}})),O(!0))},children:[e.jsx(m,{id:"animationStyle",className:"w-[180px] bg-white",children:e.jsx(f,{placeholder:"Select animation style"})}),e.jsxs(p,{children:[e.jsx(s,{value:"none",children:"None"}),e.jsx(s,{value:"fade",children:"Fade in"}),e.jsx(s,{value:"top",children:"Slide in from top"}),e.jsx(s,{value:"bottom",children:"Slide in from bottom"}),e.jsx(s,{value:"left",children:"Slide in from left"}),e.jsx(s,{value:"right",children:"Slide in from right"})]})]})]})]})})]})]})]})]})})})}),e.jsx("div",{className:"fixed bottom-0 left-0 right-0 p-2.5 z-50 pointer-events-none",children:e.jsx("div",{className:"flex justify-end items-center mx-auto pointer-events-auto",children:e.jsxs("div",{className:"flex gap-2 p-2 rounded-lg",style:{backgroundColor:"rgb(5, 54, 94)"},children:[He&&e.jsx(k,{children:e.jsx(P.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",stiffness:300,damping:30},children:pe.isPending?e.jsx(a,{variant:"outline",disabled:!0,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ot,{}),"Saving..."]})}):e.jsxs(a,{variant:"outline",onClick:()=>pe.mutate(),disabled:M,className:l("relative flex items-center gap-2",M?"border-red-300 bg-red-50 text-red-600 cursor-not-allowed opacity-60":"border-yellow-300 bg-yellow-50 text-yellow-800 hover:bg-yellow-100"),title:M?"Fix validation errors before saving":void 0,children:[e.jsx(Te,{className:"h-4 w-4"}),M?"Fix Errors":"Save Changes",!M&&e.jsxs("span",{className:"absolute -top-1 -right-1 flex size-3",children:[e.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-yellow-600 opacity-75"}),e.jsx("span",{className:"relative inline-flex size-3 rounded-full bg-yellow-600"})]})]})})}),e.jsx(k,{children:q&&e.jsx(P.div,{initial:{opacity:0,scale:.8,y:-10}
4,animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-10},transition:{duration:.3,ease:"easeOut"},className:"flex items-center px-3 py-2 text-green-600 text-sm",children:"Done!"})}),e.jsxs("div",{className:"flex items-center gap-2 px-3 bg-white/10 rounded-md h-9",children:[e.jsx(h,{htmlFor:"cart-items-count",className:"text-white text-sm whitespace-nowrap",children:"Cart Items:"}),e.jsxs(g,{value:te.toString(),onValueChange:n=>We(parseInt(n)),children:[e.jsx(m,{id:"cart-items-count",className:"w-14 h-7 bg-white",children:e.jsx(f,{})}),e.jsxs(p,{children:[e.jsx(s,{value:"1",children:"1"}),e.jsx(s,{value:"2",children:"2"}),e.jsx(s,{value:"3",children:"3"})]})]})]}),e.jsx(a,{variant:"outline",onClick:Ge,children:U?"Show Form Modal":"Show Success Modal"}),e.jsxs(a,{variant:"outline",onClick:()=>je("email-delivery"),children:["Next: Email Delivery",e.jsx(St,{className:"w-4 h-4"})]})]})})})]}),e.jsx(ye,{value:"email-delivery",children:e.jsx(Ct,{beeToken:V,data:_e,setPageData:xe,type:w,siteId:Y,displayConditions:ze})})]})]})};export{xs 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.