1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="f22d47f0-3aad-4004-ae4b-a347bf992fe3",e._sentryDebugIdIdentifier="sentry-dbid-f22d47f0-3aad-4004-ae4b-a347bf992fe3")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[56131],{84491:function(e,l,a){a.d(l,{I:function(){return n},J:function(){return t}});var s=a(87066);let r="https://vanzzz-backend-production.up.railway.app",t=async()=>{let{data:e}=await s.Z.get("".concat(r,"/images/all"));return e},n=async e=>{let l=new FormData;l.append("image",e);let{data:a}=await s.Z.post("".concat(r,"/images/upload"),l,{headers:{"Content-Type":"multipart/form-data"}});return a}},16838:function(e,l,a){a.d(l,{M:function(){return d}});var s=a(85893),r=a(84491),t=a(25675),n=a.n(t),i=a(67294),c=a(26806);let d=e=>{let{selectedImageUrls:l=[],onSelect:a,maxSelect:t,heroImageUrl:d,onHeroSelect:o}=e,[u,m]=(0,i.useState)(l.map(e=>({url:e,name:e.split("/").pop()||""}))),[x,h]=(0,i.useState)([]),[f,j]=(0,i.useState)(!0);(0,i.useEffect)(()=>{let e=async()=>{j(!0);let e=await (0,r.J)();h(e.resources),j(!1)};e()},[]);let p=e=>{let l=u.some(l=>l.url===e.url);if(l){let l=u.filter(l=>l.url!==e.url);m(l),null==a||a(l.map(e=>e.url)),d===e.url&&(null==o||o(null))}else{if(t&&u.length>=t)return;let l=[...u,e];m(l),null==a||a(l.map(e=>e.url))}},g=(e,l)=>{l.preventDefault(),l.stopPropagation(),d===e.url?null==o||o(null):null==o||o(e.url)},v=e=>u.some(l=>l.url===e.url),b=e=>d===e.url;return(0,s.jsx)("div",{className:"w-full",children:f?(0,s.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,s.jsx)("div",{className:"text-gray-500",children:"Loading images..."})}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[t&&(0,s.jsxs)("div",{className:"text-sm text-gray-600",children:["Selected: ",u.length,"/",t," images"]}),o&&(0,s.jsx)("div",{className:"text-sm text-gray-600 flex items-center gap-2",children:d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("svg",{className:"w-4 h-4 text-yellow-500",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})}),"Hero image selected"]}),u.some(e=>e.url===d)&&(0,s.jsx)("span",{className:"text-xs text-blue-600 bg-blue-100 px-2 py-1 rounded-full",children:"Also selected"})]}):"No hero image selected"})]}),(0,s.jsx)("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 xl:grid-cols-10 gap-2",children:x.map(e=>{let l=v(e),a=b(e);return(0,s.jsxs)("div",{className:(0,c.cn)("relative group cursor-pointer rounded-lg overflow-hidden border-2 transition-all duration-200 hover:shadow-md",a?"border-yellow-500 shadow-md":l?"border-blue-500 shadow-md":"border-gray-200 hover:border-gray-300"),onClick:()=>p(e),children:[(0,s.jsxs)("div",{className:"aspect-square relative",children:[(0,s.jsx)(n(),{src:e.url.replace(".heic",".jpg"),alt:e.name,fill:!0,className:"object-cover",sizes:"(max-width: 640px) 50vw, (max-width: 768px) 33vw, (max-width: 1024px) 25vw, (max-width: 1280px) 20vw, 16vw"}),a&&(0,s.jsx)("div",{className:"absolute inset-0 bg-yellow-500 bg-opacity-20 flex items-center justify-center",children:(0,s.jsx)("div",{className:"bg-yellow-500 text-white rounded-full w-6 h-6 flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})})})}),l&&!a&&(0,s.jsx)("div",{className:"absolute inset-0 bg-blue-500 bg-opacity-20 flex items-center justify-center",children:(0,s.jsx)("div",{className:"bg-blue-500 text-white rounded-full w-4 h-4 flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-3 h-3",fill:"
1currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})}),l&&a&&(0,s.jsx)("div",{className:"absolute bottom-1 left-1 bg-blue-500 text-white rounded-full w-4 h-4 flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),(0,s.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-20 transition-all duration-200 flex items-center justify-center",children:!l&&!a&&(0,s.jsx)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,s.jsx)("div",{className:"bg-white text-gray-700 rounded-full w-4 h-4 flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})})})})}),o&&(0,s.jsx)("button",{type:"button",className:"absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 bg-white rounded-full p-1 shadow-md hover:bg-gray-100",onClick:l=>g(e,l),title:a?"Remove as hero image":"Set as hero image",children:a?(0,s.jsx)("svg",{className:"w-3 h-3 text-yellow-600",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})}):(0,s.jsx)("svg",{className:"w-3 h-3 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})})]}),(0,s.jsx)("div",{className:"p-1 bg-white",children:(0,s.jsx)("p",{className:"text-xs text-gray-600 truncate",title:e.name,children:e.name})})]},e.url)})})]})})}},10850:function(e,l,a){a.d(l,{g:function(){return E}});var s=a(85893),r=a(14685),t=a(32383),n=a(50381),i=a(44567),c=a(80044),d=a(9383),o=a(49235),u=a(30211),m=a(16838),x=a(2750),h=a(67294),f=a(34958),j=a(13742),p=a(31012),g=a(26806),v=a(50107),b=a(98826);function N(e){let{options:l,value:a,onValueChange:t,placeholder:i="Select option...",className:c,onCreateNew:d,createPlaceholder:o="Create new..."}=e,[u,m]=(0,h.useState)(!1),[x,N]=(0,h.useState)(""),[w,y]=(0,h.useState)(!1),C=l.find(e=>e.value===a),k=async()=>{if(x.trim()&&d){y(!0);try{await d(x.trim()),N(""),m(!1)}catch(e){console.error("Failed to create new item:",e)}finally{y(!1)}}};return(0,s.jsxs)(b.J2,{open:u,onOpenChange:m,children:[(0,s.jsx)(b.xo,{asChild:!0,children:(0,s.jsxs)(r.z,{variant:"outline",role:"combobox","aria-expanded":u,className:(0,g.cn)("w-full justify-between",c),children:[C?C.label:i,(0,s.jsx)(f.default,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,s.jsx)(b.yk,{className:"w-full p-0",children:(0,s.jsxs)(v.mY,{children:[(0,s.jsx)(v.sZ,{placeholder:"Search..."}),(0,s.jsxs)(v.e8,{children:[(0,s.jsx)(v.rb,{children:"No option found."}),(0,s.jsx)(v.fu,{children:l.map(e=>(0,s.jsxs)(v.di,{value:e.label,onSelect:()=>{t(e.value,e.icon),m(!1)},children:[(0,s.jsx)(j.default,{className:(0,g.cn)("mr-2 h-4 w-4",a===e.value?"opacity-100":"opacity-0")}),e.label]},e.value))}),d&&(0,s.jsx)(v.fu,{children:(0,s.jsxs)("div",{className:"flex items-center gap-2 p-2",children:[(0,s.jsx)(n.I,{placeholder:o,value:x,onChange:e=>N(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),k())},className:"flex-1"}),(0,s.jsx)(r.z,{size:"sm",onClick:k,disabled:!x.trim()||w,children:(0,s.jsx)(p.default,{className:"h-4 w-4"})})]})})]})]})})]})}var w=a(87479);let y=w.fC,C=w.wy,k=w.Fw;var z=a(56312),I=a(87536),S=a(1604);let R=S.z.object({name:S.z.string().min(1,"Name is required"),icon:S.z.string().min(1,"Icon
1is required")}),F=S.z.object({name:S.z.string().min(1),description:S.z.string().min(1),blurb:S.z.string().optional(),lowSeasonPrice:S.z.number().min(1),shoulderSeasonEarlyPrice:S.z.number().min(1),shoulderSeasonLatePrice:S.z.number().min(1),peakSeasonPrice:S.z.number().min(1),published:S.z.boolean(),sleeps:S.z.number().min(1),extras:S.z.string().array(),keyFeatures:R.array().min(0),whatsIncluded:R.array().min(0),images:S.z.array(S.z.string()).min(0),heroImage:S.z.string().optional()});var P=a(61667),D=a(56967),L=a(8971),V=a(64998),W=a(36316);let E=e=>{var l,a,f,j,p,g,v;let{onConfirm:b,defaultValues:w={name:"",description:"",blurb:"",lowSeasonPrice:void 0,shoulderSeasonEarlyPrice:void 0,shoulderSeasonLatePrice:void 0,peakSeasonPrice:void 0,published:!0,sleeps:void 0,extras:[],keyFeatures:[],whatsIncluded:[],images:[]},extras:S}=e,[R,E]=(0,h.useState)(null!==(l=null==w?void 0:w.images)&&void 0!==l?l:[]),[J,Z]=(0,h.useState)(null!==(a=null==w?void 0:w.heroImage)&&void 0!==a?a:void 0),[O,Y]=(0,h.useState)(!1),[G,X]=(0,h.useState)(!1),[_,M]=(0,h.useState)(!1),[B,U]=(0,h.useState)(!1),{toast:q}=(0,D.pm)(),{data:A,refetch:H}=(0,P.DH)(),{data:K,refetch:T}=(0,P.sE)(),[Q]=(0,P.Zd)(),[$]=(0,P.R7)(),ee=(0,h.useCallback)(e=>{E(e)},[]),el=(0,h.useCallback)(e=>{Z(e||void 0)},[]),ea=null!==(p=null==S?void 0:S.extras.map(e=>({label:null!==(f=null==e?void 0:e.name)&&void 0!==f?f:"",value:null!==(j=null==e?void 0:e.id.toString())&&void 0!==j?j:""})))&&void 0!==p?p:[],es=null!==(g=null==A?void 0:A.keyFeatures.filter(e=>null!=e).map(e=>({label:e.name,value:e.name,icon:e.icon})))&&void 0!==g?g:[],er=null!==(v=null==K?void 0:K.whatsIncluded.filter(e=>null!=e).map(e=>({label:e.name,value:e.name,icon:e.icon})))&&void 0!==v?v:[],et=async e=>{try{await Q({variables:{createKeyFeatureInput:{name:e,icon:"check"}}}),await H(),q({title:"Key feature created successfully",variant:"default"})}catch(e){throw q({title:"Failed to create key feature",variant:"destructive"}),e}},en=async e=>{try{await $({variables:{createWhatsIncludedInput:{name:e,icon:"check"}}}),await T(),q({title:"What's included item created successfully",variant:"default"})}catch(e){throw q({title:"Failed to create what's included item",variant:"destructive"}),e}},ei=(0,I.cI)({resolver:(0,z.F)(F),defaultValues:w}),{fields:ec,append:ed,remove:eo,update:eu}=(0,I.Dq)({control:ei.control,name:"keyFeatures"}),{fields:em,append:ex,remove:eh,update:ef}=(0,I.Dq)({control:ei.control,name:"whatsIncluded"}),ej=async e=>{M(!0);try{await b({...e,extras:e.extras.map(e=>Number(e)),images:R,heroImage:J}),U(!0)}catch(e){console.error("Form submission error:",e)}finally{M(!1)}};return(0,s.jsx)(t.l0,{...ei,children:(0,s.jsx)("form",{onSubmit:ei.handleSubmit(ej),children:(0,s.jsxs)(u.mQ,{defaultValue:"details",className:"w-full",children:[(0,s.jsxs)(u.dr,{className:"mb-6",children:[(0,s.jsx)(u.SP,{value:"details",children:"Details"}),(0,s.jsx)(u.SP,{value:"images",children:"Images"})]}),(0,s.jsxs)(u.nU,{value:"details",children:[(0,s.jsxs)(d.Zb,{className:"mb-6",children:[(0,s.jsx)(d.Ol,{children:(0,s.jsx)(d.ll,{children:"Van Variation Details"})}),(0,s.jsx)(d.aY,{children:(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,s.jsx)(t.Wi,{control:ei.control,name:"name",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{children:[(0,s.jsx)(t.lX,{children:"Name"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(n.I,{placeholder:"Enter name",...l})}),(0,s.jsx)(t.zG,{})]})}}),(0,s.jsx)(t.Wi,{control:ei.control,name:"blurb",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{children:[(0,s.jsx)(t.lX,{children:"Blurb"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(n.I,{placeholder:"Short blurb",...l})}),(0,s.jsx)(t.zG,{})]})}}),(0,s.jsx)(t.Wi,{control:ei.control,name:"sleeps",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{children:[(0,s.jsx)(t.lX,{children:"Sleeps"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(n.I,{type:"number",min:1,...l,onChange:e=>l.onChange(Number(e.target.value))})}),(0,s.jsx)(t.zG,{})]})}}),(0,s.jsx)(t.Wi,{control:ei.control,name:"description",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{className:"md:col-span-2",children:[(0,s.jsx)(t.lX,{children:"Description"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(c.g,{placeholder:"Enter description",className:"min-h-[120px] resize-y",...l})}),(0,s.jsx)(t.zG,{})]})}})]})})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,s.jsxs)(d.Zb,{children:[(0,s.jsx)(d.Ol,{children:(0,s.jsx)(d.ll,{children:"Pricing"})}),(0,s.jsx)(d.aY,{children:(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsx)(t.Wi,{control:ei.control,name:"lowSeasonPrice",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{children:[(0,s.jsx)(t.lX,{children:"Low Season"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(n.I,{type:"number",min:0,...l,onChange:e=>l.onChange(Number(e.target.value))})}),(0,s.jsx)(t.zG,{})]})}}),(0,s.jsx)(t.Wi,{control:ei.control,name:"shoulderSeasonEarlyPrice",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{children:[(0,s.jsx)(t.lX,{children:"Shoulder Early"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(n.I,{type:"number",min:0,...l,onChange:e=>l.onChange(Number(e.target.value))})}),(0,s.jsx)(t.zG,{})]})}}),(0,s.jsx)(t.Wi,{control:ei.control,name:"shoulderSeasonLatePrice",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{children:[(0,s.jsx)(t.lX,{children:"Shoulder Late"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(n.I,{type:"number",min:0,...l,onChange:e=>l.onChange(Number(e.target.value))})}),(0,s.jsx)(t.zG,{})]})}}),(0,s.jsx)(t.Wi,{control:ei.control,name:"peakSeasonPrice",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{children:[(0,s.jsx)(t.lX,{children:"Peak Season"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(n.I,{type:"number",min:0,...l,onChange:e=>l.onChange(Number(e.target.value))})}),(0,s.jsx)(t.zG,{})]})}})]})})]})}),(0,s.jsx)(o.Z,{className:"my-8"}),(0,s.jsx)(d.Zb,{className:"mb-6",children:(0,s.jsx)(d.Ol,{children:(0,s.jsxs)(y,{open:O,onOpenChange:Y,children:[(0,s.jsx)(C,{asChild:!0,children:(0,s.jsxs)(r.z,{type:"button",variant:"ghost",className:"p-0 h-auto flex items-center gap-2 hover:bg-transparent w-full justify-start",children:[(0,s.jsx)(d.ll,{className:"text-left",children:"Key Features"}),O?(0,s.jsx)(L.default,{className:"h-4 w-4 ml-auto"}):(0,s.jsx)(V.default,{className:"h-4 w-4 ml-auto"})]})}),(0,s.jsx)(k,{children:(0,s.jsx)(d.aY,{className:"pt-4",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex gap-2 mb-2",children:[(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("label",{className:"text-sm font-medium text-foreground",children:"Name"})}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsxs)("label",{className:"text-sm font-medium text-foreground",children:["Icon"," ",(0,s.jsx)("a",{href:"https://lucide.dev/icons/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline text-xs",children:"(Lucide React Icons)"})]})}),(0,s.jsx)("div",{className:"w-8"})]}),ec.map((e,l)=>(0,s.jsxs)("div",{className:"flex gap-2 items-end",children:[(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)(N,{options:es,value:ei.watch("keyFeatures.".concat(l,".name"))||"",onValueChange:(e,a)=>{ei.setValue("keyFeatures.".concat(l,".name"),e),a&&ei.setValue("keyFeatures.".concat(l,".icon"),a)},placeholder:"Select or create key feature...",onCreateNew:et,createPlaceholder:"Create new key feature..."})}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)(n.I,{placeholder:"Icon name (e.g. car, bed, star)",...ei.register("keyFeatures.".concat(l,".icon"))})}),(0,s.jsx)(r.z,{type:"button",variant:"ghost",size:"icon",className:"text-destructive border border-destructive hover:bg-destructive/10",onClick:()=>eo(l),title:"Remove",children:"\xd7"})]},e.id)),(0,s.jsx)(r.z,{type:"button",variant:"secondary",className:"mt-2",onClick:()=>ed({name:"",icon:""}),children:"+ Add Key Feature"})]})})})]})})}),(0,s.jsx)(d.Zb,{className:"mb-6",children:(0,s.jsx)(d.Ol,{children:(0,s.jsxs)(y,{open:G,onOpenChange:X,children:[(0,s.jsx)(C,{asChild:!0,children:(0,s.jsxs)(r.z,{type:"button",variant:"ghost",className:"p-0 h-auto flex items-center gap-2 hover:bg-transparent w-full justify-start",children:[(0,s.jsx)(d.ll,{className:"text-left",children:"What's Included"}),G?(0,s.jsx)(L.default,{className:"h-4 w-4 ml-auto"}):(0,s.jsx)(V.default,{className:"h-4 w-4 ml-auto"})]})}),(0,s.jsx)(k,{children:(0,s.jsx)(d.aY,{className:"pt-4",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex gap-2 mb-2",children:[(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("label",{className:"text-sm font-medium text-foreground",children:"Name"})}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsxs)("label",{className:"text-sm font-medium text-foreground",children:["Icon"," ",(0,s.jsx)("a",{href:"https://lucide.dev/icons/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline text-xs",children:"(Lucide React Icons)"})]})}),(0,s.jsx)("div",{className:"w-8"})]}),em.map((e,l)=>(0,s.jsxs)("div",{className:"flex gap-2 items-end",children:[(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)(N,{options:er,value:ei.watch("whatsIncluded.".concat(l,".name"))||"",onValueChange:(e,a)=>{ei.setValue("whatsIncluded.".concat(l,".name"),e),a&&ei.setValue("whatsIncluded.".concat(l,".icon"),a)},placeholder:"Select or create what's included...",onCreateNew:en,createPlaceholder:"Create new what's included..."})}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)(n.I,{placeholder:"Icon name (e.g. car, bed, star)",...ei.register("whatsIncluded.".concat(l,".icon"))})}),(0,s.jsx)(r.z,{type:"button",variant:"ghost",size:"icon",className:"text-destructive border border-destructive hover:bg-destructive/10",onClick:()=>eh(l),title:"Remove",children:"\xd7"})]},e.id)),(0,s.jsx)(r.z,{type:"button",variant:"secondary",className:"mt-2",onClick:()=>ex({name:"",icon:""}),children:"+ Add What's Included"})]})})})]})})}),(0,s.jsxs)(d.Zb,{className:"mb-6",children:[(0,s.jsx)(d.Ol,{children:(0,s.jsx)(d.ll,{children:"Extras"})}),(0,s.jsx)(d.aY,{children:(0,s.jsx)(t.Wi,{control:ei.control,name:"extras",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{children:[(0,s.jsx)(t.lX,{children:"Available extras"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(x.N,{options:ea,value:l.value,onValueChange:l.onChange,placeholder:"Select extras...",className:"w-full",showAllSelected:!0})}),(0,s.jsx)(t.zG,{})]})}})})]}),(0,s.jsxs)(d.Zb,{className:"mb-6",children:[(0,s.jsx)(d.Ol,{children:(0,s.jsx)(d.ll,{children:"Publishing"})}),(0,s.jsx)(d.aY,{children:(0,s.jsx)(t.Wi,{control:ei.control,name:"published",render:e=>{let{field:l}=e;return(0,s.jsxs)(t.xJ,{children:[(0,s.jsx)(t.lX,{className:"mr-3",children:"Published"}),(0,s.jsx)(t.NI,{children:(0,s.jsx)(i.r,{checked:l.value,onCheckedChange:l.onChange})}),(0,s.jsx)(t.zG,{})]})}})})]}),(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(r.z,{type:"submit",disabled:_,children:_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W.default,{className:"mr-2 h-4 w-4 animate-spin"}),"Submitting..."]}):"Submit"})})]}),(0,s.jsxs)(u.nU,{value:"images",children:[(0,s.jsxs)(d.Zb,{children:[(0,s.jsx)(d.Ol,{children:(0,s.jsx)(d.ll,{children:"Images"})}),(0,s.jsx)(d.aY,{children:(0,s.jsx)(m.M,{selectedImageUrls:R,onSelect:ee,heroImageUrl:J,onHeroSelect:el})})]}),(0,s.jsx)("div",{className:"flex justify-end mt-6",children:(0,s.jsx)(r.z,{type:"submit",disabled:_,children:_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W.default,{className:"mr-2 h-4 w-4 animate-spin"}),"Submitting..."]}):"Submit"})})]})]})})})}},28828:function(e,l,a){a.d(l,{a:function(){return i}});var s=a(85893),r=a(41664),t=a.n(r),n=a(64998);let i=e=>{let{items:l}=e;return(0,s.jsx)("nav",{className:"flex items-center space-x-1 text-sm text-muted-foreground",children:l.map((e,l)=>(0,s.jsxs)("div",{className:"flex items-center",children:[l>0&&(0,s.jsx)(n.default,{className:"h-4 w-4 mx-1"}),e.href?(0,s.jsx)(t(),{href:e.href,className:"hover:text-foreground transition-colors",children:e.label}):(0,s.jsx)("span",{className:"text-foreground",children:e.label})]},l))})}},9383:function(e,l,a){a.d(l,{Ol:function(){return i},Zb:function(){return n},aY:function(){return o},ll:function(){return c}});var s=a(85893),r=a(67294),t=a(26806);let n=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:l,className:(0,t.cn)("rounded-xl border bg-card text-card-foreground shadow",a),...r})});
1n.displayName="Card";let i=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:l,className:(0,t.cn)("flex flex-col space-y-1.5 p-6",a),...r})});i.displayName="CardHeader";let c=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:l,className:(0,t.cn)("font-semibold leading-none tracking-tight",a),...r})});c.displayName="CardTitle";let d=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:l,className:(0,t.cn)("text-sm text-muted-foreground",a),...r})});d.displayName="CardDescription";let o=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:l,className:(0,t.cn)("p-6 pt-0",a),...r})});o.displayName="CardContent";let u=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:l,className:(0,t.cn)("flex items-center p-6 pt-0",a),...r})});u.displayName="CardFooter"},44567:function(e,l,a){a.d(l,{r:function(){return i}});var s=a(85893),r=a(67294),t=a(60761),n=a(26806);let i=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)(t.fC,{className:(0,n.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...r,ref:l,children:(0,s.jsx)(t.bU,{className:(0,n.cn)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})});i.displayName=t.fC.displayName},30211:function(e,l,a){a.d(l,{SP:function(){return d},dr:function(){return c},mQ:function(){return i},nU:function(){return o}});var s=a(85893),r=a(67294),t=a(60434),n=a(26806);let i=t.fC,c=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)(t.aV,{ref:l,className:(0,n.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...r})});c.displayName=t.aV.displayName;let d=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)(t.xz,{ref:l,className:(0,n.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",a),...r})});d.displayName=t.xz.displayName;let o=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)(t.VY,{ref:l,className:(0,n.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a),...r})});o.displayName=t.VY.displayName},80044:function(e,l,a){a.d(l,{g:function(){return n}});var s=a(85893),r=a(67294),t=a(26806);let n=r.forwardRef((e,l)=>{let{className:a,...r}=e;return(0,s.jsx)("textarea",{className:(0,t.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:l,...r})});n.displayName="Textarea"}}]);
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.