1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4796e839-2eb5-4237-96a9-b774c23731ff",e._sentryDebugIdIdentifier="sentry-dbid-4796e839-2eb5-4237-96a9-b774c23731ff")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3888],{33590:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/seller/product/create",function(){return i(42216)}])},44877:function(e,t,i){"use strict";i.d(t,{M:function(){return s}});var r=i(85893);let s=(0,i(67294).memo)(function(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10",fill:"none",viewBox:"0 0 14 10",children:(0,r.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M1.5 5l3.668 3.5 7.332-7"})})})},42216:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return W},default:function(){return J}});var r=i(85893),s=i(2679),a=i(52711),l=i(50780),n=i(6244),o=i(30150),d=i(86010),c=i(86650),u=i(25675),m=i.n(u),g=i(41664),p=i.n(g),h=i(11163),x=i(67294),b=i(87536),f=i(1762),j=i(64712),y=i(44877),v=i(98512),k=i(34997),w=i(1604),N=i(15482),P=i(73865),A=i(31415),C=i(88125),_=i(96055);let F=["image/png","image/jpeg","image/gif","image/jpg","image/webp"],R=e=>{let{images:t,setImages:i}=e,s=(0,x.useRef)(null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"ImagesSelectorRow",children:[t?.map((e,s)=>r.jsxs("div",{className:"ImagesSelectorItem relative",children:[r.jsx(m(),{src:URL.createObjectURL(e),alt:"Product image",className:"radius-s shadow-m",width:150*3,height:100*3}),r.jsx("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),i(e=>[...e].filter((e,t)=>t!==s))}
1,className:"absolute padding-2xs ControlButton",style:{top:"5px",right:"5px"},children:r.jsx(A.Z,{className:"svg-m"})}),r.jsxs("div",{className:"MoveImages absolute",children:[r.jsx("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),i(e=>{let t=e[s],i=s-1;i<0&&(i=e.length-1),i>e.length-1&&(i=0);let r=[...e].filter((e,t)=>t!==s);return r.splice(i,0,t),r})},className:d.Z("ControlButton",{"opacity-50":0===s}),children:r.jsx(C.Z,{className:"svg-m"})}),r.jsx("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),i(e=>{let t=e[s],i=s+1;i<0&&(i=e.length-1),i>e.length-1&&(i=0);let r=[...e].filter((e,t)=>t!==s);return r.splice(i,0,t),r})},className:d.Z("ControlButton",{"opacity-50":s===t.length-1}),children:r.jsx(_.Z,{className:"svg-m"})})]})]},s)),(0,r.jsx)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation();let t=s.current;t&&(t.click(),t.onchange=()=>{let e=Array.from(t.files||[]);i(t=>[...t,...e].slice(0,15))})},className:"ImagesSelectorAddButton",children:"Add image"})]}),(0,r.jsx)("input",{type:"file",ref:s,accept:F.join(","),multiple:!0,hidden:!0,style:{display:"none"}})]})};var S=i(47339),D=i(60531),I=i(32507),B=i(87155),q=i(10711),L=i(82698),O=i(29111),E=i(61696),z=i(35140),U=i(5526),$=i(77581),Z=i(18293),M=i(24738),H=i(402);let V=`Please select price between ${z.zp}0 and ${z.zp}200. If you want to offer your product for free, please select 0.`,G={product_already_exists:"Product with the same slug already exists. Please choose a different title.",product_limit_reached:"You have reached the maximum number of products.",user_not_found:"Please refresh the page and try again.",stripe_account_not_found:"Please complete the onboarding process. Contact support if this issue persists."},K=M.zC.extend({suggestedPrice:w.z.number().min(0).max(1e5).nullable(),price:w.z.number().min(0).max(1e5).nullable(),isFinished:w.z.boolean().optional(),isComingSoon:w.z.boolean().optional(),eta:w.z.object({month:w.z.number(),year:w.z.number()}).optional()}).pick({organizationId:!0,title:!0,subtitle:!0,slug:!0,description:!0,keyPoints:!0,liveLink:!0,guideLink:!0,restrictedArea:!0,category:!0,featuredImage:!0,images:!0,isFree:!0,isBundle:!0,featuredImageBlurHash:!0,appData:!0,variants:!0,price:!0,status:!0,suggestedPrice:!0,isFinished:!0,isComingSoon:!0,eta:!0}),T=()=>{let e=(0,$.k)(),{register:t,handleSubmit:i,watch:s,setValue:u,formState:g}=(0,b.cI)({shouldUseNativeValidation:!0,defaultValues:{description:U.i4,restrictedArea:U.V_,isBundle:!1,isFree:!1,suggestedBricksPrice:"",suggestedOxygenPrice:"",suggestedFigmaPrice:"",suggestedPrice:"",category:[H.Pp.Template],keyPoints:[],images:[],appData:U.ig,isFinished:!0,isComingSoon:!1,eta:{month:new Date().getMonth()+1,year:new Date().getFullYear()},slug:"",subtitle:""}}),w=s(),A=(0,h.useRouter)(),C=(0,D.G)(),_=(0,f.y$)(),F=(0,x.useRef)(null),T=(0,x.useRef)(null),Y=(0,x.useRef)(null),[W,J]=(0,x.useState)([]),[X,Q]=(0,x.useState)(""),ee=(0,x.useCallback)(async(t,i)=>{if(!e||!t)return null;try{let r=await (0,I.t)({file:t,maxWidth:2500}),s=e.id,a=t.name.split(".").pop(),l=`organizations/${s}/${i}.${a}`,n=(0,c.iH)(_,l),o=await (0,c.KV)(n,r,{cacheControl:"max-age=31536000",customMetadata:{organizationId:s}});return{url:await (0,c.Jt)(o.ref),path:o.ref.fullPath}}catch(e){console.error(e),j.A.error("Error uploading file")}},[e,_]),et=(0,x.useCallback)(async t=>{let{file:i,name:r,extension:s}=t;if(!e?.id||!i||!r||!s)return null;let a=(0,c.iH)(_,`organizations/${e.id}/${r}.${s}`);try{let t=await (0,c.KV)(a,i,{cacheControl:"max-age=31536000",contentType:i.type,customMetadata:{organizationId:e.id}}),r=await (0,c.Jt)(t.ref);return{path:t.ref.fullPath,url:r}}catch(e){console.error(e),j.A.error("Error uploading file")}},[e,_]),ei=(0,x.useCallback)(async e=>{let{images:t,slug:i}=e,r=[],s=async(e,t)=>{let s=`product_image_${i}_${performance.now()}_${t}`,a=await ee(e,s);if(a?.url){let{url:t,path:i}=a,s=await (0,I.t)({file:e,maxWidth:70}),l=document.createElement("img");l.src=URL.createObjectURL(s),l.style.display="none",document.body.appendChild(l),await new Promise(e=>l.onload=()=>e(!0));let n=await (0,S.V)(l);r.push({url:t,path:i,blurHash:n});return}j.A.error(`Failed to upload file: ${t+1}.`)};return await Promise.all(t.map(s)),r},[ee]),er=(0,x.useMemo)(()=>{let e=0;return w.restrictedArea.oxygen?.enabled&&(e+=Number(w.suggestedOxygenPrice)),w.restrictedArea.bricks?.enabled&&(e+=Number(w.suggestedBricksPrice)),w.restrictedArea.figma?.enabled&&(e+=Number(w.suggestedFigmaPrice)),e},[w.restrictedArea.oxygen?.enabled,w.restrictedArea.bricks?.enabled,w.restrictedArea.figma?.enabled,w.suggestedOxygenPrice,w.suggestedBricksPrice,w.suggestedFigmaPrice]),es=(0,x.useCallback)(async(t,i)=>{let r=i?.nativeEvent?.submitter?.dataset?.submit==="draft";j.A.promise(async()=>new Promise(async(i,s)=>{try{if(!e){Q("Please refresh the page and try again"),s();return}if(!t.slug){Q("Please enter a slug"),s();return}if(t.slug.length<4){Q("Slug must be at least 4 characters long"),s();return}if(!(t.category.length>0)){Q("Please select at least one category"),s();return}if(!Object.values(t.restrictedArea).some(e=>e.enabled)){Q("Please select at least one product variant"),s();return}if(!(t.appData?.type!==M.Uv.Modified||t.appData?.id!=="")){Q("Select public Core Framework project"),s();return}if(!Object.entries(t.restrictedArea).some(e=>{let[t,i]=e;return!!i.enabled&&("figma"===t?i?.figmaUrl:"bricks"===t?i?.bricksDesignSetKey&&i?.bricksDesignSetUrl:"oxygen"===t&&i?.oxygenDesignSetKey)}
1)){Q("Please fill in at least one restricted area field."),s();return}let a=!!t.isBundle,l=[t.suggestedOxygenPrice,t.suggestedBricksPrice,t.suggestedFigmaPrice].some(e=>""!==e);if(!(a||l)){Q("Please fill in at least one price."),s();return}let n=`featured_image_${t.slug}_${Date.now()}`,o=W?.[0];if(!o){Q("Please select at least one image"),s();return}let d="",c="";if(o){let e=await (0,I.t)({file:o,maxWidth:70}),t=document.createElement("img");t.src=URL.createObjectURL(e),t.style.display="none",document.body.appendChild(t),await new Promise(e=>t.onload=()=>e(!0));let[i,r]=await Promise.all([ee(o,n),(0,S.V)(t)]);if(c=r,!i?.url)return s("Error uploading file");d=i.url}let u=await ei({images:W.slice(1),slug:t.slug}),m=F.current?.files?.[0];if(t.restrictedArea.figma?.enabled&&m){let e=await et({file:m,name:`cf-bricks-${t.slug}-1`,extension:"fig"});if(!e)return s("Error uploading file");t.restrictedArea.figma.figmaFileUrl=e.url,t.restrictedArea.figma.figmaFilePath=e.path}let g=T.current?.files?.[0];if(t.restrictedArea.bricks?.enabled&&g){let e=await et({file:g,name:`cf-bricks-${t.slug}-1`,extension:"zip"});if(!e)return s("Error uploading file");t.restrictedArea.bricks.bricksDesignSetZipUrl=e.url,t.restrictedArea.bricks.bricksDesignSetZipPath=e.path}let p=Y.current?.files?.[0];if(t.restrictedArea.oxygen?.enabled&&p){let e=await et({file:p,name:`cf-oxygen-${t.slug}-1`,extension:"zip"});if(!e)return s("Error uploading file");t.restrictedArea.oxygen.oxygenDesignSetZipUrl=e.url,t.restrictedArea.oxygen.oxygenDesignSetZipPath=e.path}let h=!!t.isBundle&&"0"===t.suggestedPrice,x=h?0:Number((100*Number(t.suggestedPrice)).toFixed(2)),b=H.Pt.Draft;r||(b=H.Pt.AwaitingApproval),t.isComingSoon&&(b=H.Pt.AwaitingComingSoonApproval);let f=K.safeParse({organizationId:e.id,title:t.title,subtitle:t.subtitle,price:x,description:t.description,slug:t.slug,status:b,restrictedArea:t.restrictedArea,liveLink:t.liveLink||"",guideLink:t.guideLink||"",featuredImage:d,variants:(0,Z.V)({bricksPrice:!!t.restrictedArea.bricks?.enabled&&t.suggestedBricksPrice,oxygenPrice:!!t.restrictedArea.oxygen?.enabled&&t.suggestedOxygenPrice,figmaPrice:!!t.restrictedArea.figma?.enabled&&t.suggestedFigmaPrice}),keyPoints:t.keyPoints,isBundle:t.isBundle,category:t.category,appData:t.appData,featuredImageBlurHash:c,images:u,isFree:h,suggestedPrice:x,eta:t.eta});if((0,E.Cv)(f),!f.success){s(f.error);return}await C({path:"/api/product/create",method:"POST",body:f.data}),i(!0),setTimeout(()=>{A.push("/dashboard/seller")},250)}catch(e){if(Object.keys(G).includes(e.error)){let t=G[e.error];t&&Q(t)}s(e)}}),{loading:"Creating product...",success:"Product created successfully. Redirecting...",error:"Failed to create product, please contact support if this issue persists"})},[e,C,A,ee,et,W,ei]),ea=(0,x.useMemo)(()=>{let e=0;return w.restrictedArea.oxygen?.enabled&&e++,w.restrictedArea.bricks?.enabled&&e++,w.restrictedArea.figma?.enabled&&e++,e>=2},[w.restrictedArea.oxygen?.enabled,w.restrictedArea.bricks?.enabled,w.restrictedArea.figma?.enabled]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("aside",{className:(0,d.Z)("account--sidebar"),style:{maxWidth:"100%"},children:(0,r.jsx)("div",{style:{position:"sticky",top:v.VH.enable_promotion?"16rem":"12rem"},children:(0,r.jsx)(l.i,{theWatcher:w,hasFeaturedImage:W.length>0})})}),(0,r.jsx)("div",{className:"account--content",children:(0,r.jsxs)("form",{className:"column gap-l full-width radius-l bg-light-5 padding-l",onSubmit:i(es),children:[(0,r.jsx)("h1",{className:"text-xl font-600",children:"Create a new product"}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{label:"Title",htmlFor:"title",isRequired:!0}),(0,r.jsx)("input",{className:"full-width input",id:"title",type:"text",min:2,max:500,placeholder:"Eg. 150+ Brutalist Style Sections",...t("title",{required:!0,min:3,max:500})})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{label:"Subtitle",htmlFor:"subtitle",isRequired:!0}),(0,r.jsx)("input",{className:"full-width input",id:"subtitle",type:"text",min:2,max:500,placeholder:"Eg. 150+ Brutalist Style Sections",...t("subtitle",{required:!1,min:3,max:500})})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(P.__,{label:"Slug",htmlFor:"slug",isRequired:!0}),(0,r.jsxs)("p",{children:["Your product will be available at:"," ",(0,r.jsxs)("span",{className:"text-light-90",children:["/marketplace/",(0,E.k6)(w?.slug||"")]})]})]}),(0,r.jsx)("input",{className:"full-width input",id:"slug",type:"text",min:2,max:500,pattern:"[a-zA-Z0-9-]+",placeholder:"Eg. brutalist-style-sections",...t("slug",{required:!0,minLength:4,maxLength:100,pattern:/^[a-zA-Z0-9-]+$/,onChange:e=>u("slug",(0,E.k6)(e.target.value))})})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{label:"Preview link",htmlFor:"live-link",description:"The link to your product preview",isRequired:!0}),(0,r.jsx)("input",{className:"full-width input",id:"live-link",type:"url",placeholder:"Eg. https://demo.preview.com",...t("liveLink",{required:!0})})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{label:"Guide link",htmlFor:"guide-link",description:"The link to your product guide, including instructions on how to install and use your product",isRequired:!0}),(0,r.jsx)("input",{className:"full-width input",id:"guide-link",type:"url",placeholder:"Eg. https://guide.preview.com",...t("guideLink",{required:!0})})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{label:"Product category",description:"UI kits are sets of individual blocks and sections, while Templates are full pages. Choose fitting categories for your product.",htmlFor:"type"}),(0,r.jsx)("div",{className:"flex-row flex-wrap gap-2xs",children:Object.entries(H.Pp).filter(e=>{let[,t]=e;return t!==H.Pp.Addon}).map(e=>{let[,t]=e;return(0,r.jsxs)(O.u,{children:[(0,r.jsx)(O.aJ,{style:{all:"unset",display:"flex",cursor:"pointer",alignItems:"center",gap:"var(--space-3xs)",color:"var(--color-light-80)",zIndex:999999},children:(0,r.jsx)("div",{onClick:e=>{e.preventDefault(),e.stopPropagation(),u("category",w.category.includes(t)?w.category.filter(e=>e!==t):[...new Set([...w.category,t])])}
1,children:w.category.includes(t)?(0,r.jsx)(a.N8,{category:t},t):(0,r.jsx)(a.Ct,{text:H.N3[t],color:"var(--light-70)",backgroundColor:"var(--light-10)",borderColor:"transparent"})},t)}),(0,r.jsx)(O._v,{children:(0,r.jsx)("p",{className:"text-s text-light-70",children:`${w.category.includes(t)?"Remove":"Add"} ${H.N3[t]} category`})})]},t)})})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{label:"Key points",description:"Attract more customers by adding a several key points of your product. ",htmlFor:"keyPoints"}),(0,r.jsxs)("div",{className:"column gap-m",children:[(0,r.jsxs)("ul",{className:"marketplace-benefits margin-vertical-s flex-row",style:{margin:0,alignItems:"flex-start",alignContent:"flex-start"},children:[w.keyPoints?.length===0?(0,r.jsx)("p",{className:"text-light-70 text-s",children:"No key points added yet."}):null,w.keyPoints?.map(e=>r.jsx("li",{className:"row gap-3xs items-middle text-light-80",style:{cursor:"pointer"},onClick:()=>{u("keyPoints",w.keyPoints?.filter(t=>t.id!==e.id))},children:r.jsxs(O.u,{children:[r.jsxs(O.aJ,{style:{all:"unset",display:"flex",cursor:"pointer",alignItems:"center",gap:"var(--space-3xs)",color:"var(--color-light-80)"},children:[r.jsx("span",{children:r.jsx(y.M,{})}),e.title]}),r.jsx(O._v,{children:r.jsx("p",{className:"text-s text-light-70",children:"Click to remove"})})]})},e.id))]}),(0,r.jsxs)("div",{className:"row gap-2xs",children:[(0,r.jsx)("input",{type:"text",className:"input",id:"newKeyPointInput",placeholder:"Eg. 150+ sections",onKeyDown:e=>{if("Enter"!==e.key)return;if(e.preventDefault(),e.stopPropagation(),(w?.keyPoints?.length||0)>=10){j.A.error("You can only add up to 10 key points");return}let t=document.getElementById("newKeyPointInput")?.value;t&&(u("keyPoints",[...w.keyPoints||[],{id:(0,k.SK)(),title:t}]),document.getElementById("newKeyPointInput").value="")}}),(0,r.jsx)("button",{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),(w?.keyPoints?.length||0)>=10){j.A.error("You can only add up to 10 key points");return}let t=document.getElementById("newKeyPointInput")?.value;t&&(u("keyPoints",[...w.keyPoints||[],{id:(0,k.SK)(),title:t}]),document.getElementById("newKeyPointInput").value="")},className:"btn secondary",children:(0,r.jsx)(y.M,{})})]})]})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{label:"Image gallery",description:"We recommend adding at least three images to showcase your product. The recommended size is 1200x628px",htmlFor:"featured-image",id:"images",isRequired:!0}),(0,r.jsx)("div",{className:"edit-product--gallery",children:(0,r.jsx)(R,{images:W,setImages:J})})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{columnLayout:!0,children:[(0,r.jsx)(P.__,{label:"Description",description:"Dive into details of your product and explain what it includes, who is it for, how is integrated with Core Framework, etc.",htmlFor:"description",id:"description",isRequired:!0}),(0,r.jsx)(N.x,{value:w?.description||"",onChange:e=>u("description",e)})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{label:"Product status",description:"Do you want to start selling your product right away or set is as 'Coming soon' product?",htmlFor:"slug",id:"slug",isRequired:!0}),(0,r.jsxs)(o.fC,{className:"RadioGroupRoot variant-selector",defaultValue:w.isComingSoon?H.Pt.ComingSoon:H.Pt.Published,onValueChange:e=>{u("isComingSoon",e===H.Pt.ComingSoon)},children:[(0,r.jsxs)(o.ck,{className:"RadioContainer",value:H.Pt.Published,id:"published",children:[(0,r.jsx)("div",{className:"RadioGroupItem",children:(0,r.jsx)(o.z$,{className:"RadioGroupIndicator"})}),(0,r.jsx)("label",{className:"Label text-light-80 pointer",htmlFor:"published",children:(0,r.jsx)("b",{className:"text-light",children:"The product is fully finished"})})]}),(0,r.jsxs)(o.ck,{className:"RadioContainer",value:H.Pt.ComingSoon,id:"coming-soon",children:[(0,r.jsx)("div",{className:"RadioGroupItem",children:(0,r.jsx)(o.z$,{className:"RadioGroupIndicator"})}),(0,r.jsx)("label",{className:"Label text-light-80 pointer",htmlFor:"coming-soon",children:(0,r.jsx)("b",{className:"text-light",children:"Coming soon"})}),w.isComingSoon?(0,r.jsxs)("div",{className:"column gap-2xs",children:[(0,r.jsx)("p",{className:"text-light-80 margin-top-s",children:"Set the estimated time of arrival"}),(0,r.jsxs)("div",{className:"text-light-80 row gap-2xs items-center margin-top-2xs",children:[(0,r.jsxs)("select",{className:"input",style:{width:"fit-content",height:"fit-content"},onChange:e=>{u("eta.month",Number(e.target.value))},value:w.eta.month,children:[(0,r.jsx)("option",{value:"",disabled:!0,hidden:!0,children:"Month"}),Object.entries(z.gg).map((e,t)=>{let[,i]=e;return(0,r.jsx)("option",{value:t,children:i},i)})]}),(0,r.jsx)("input",{className:"input",style:{width:"fit-content",height:"fit-content"},type:"number",min:new Date().getFullYear(),max:new Date().getFullYear()+10,placeholder:"Year",onChange:e=>{u("eta.year",Number(e.target.value))},value:w.eta.year})]})]}):null]})]})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{label:"What are you selling?",description:"Set up your product variants, prices and an access to the product.",htmlFor:"variants",id:"content",isRequired:!0}),(0,r.jsxs)("div",{className:"column gap-xs full-width",children:[(0,r.jsxs)("div",{className:"column full-width",children:[(0,r.jsxs)("div",{className:"edit-product--variant",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(m(),{src:"/assets/bricks-builder-logo.jpg",alt:"Bricks",width:"40",height:"40",className:"radius-s shadow-m"}),(0,r.jsx)("div",{children:(0,r.jsx)("label",{htmlFor:"bricks-enabled",children:(0,r.jsx)("b",{className:"text-light-90 pointer",children:"Bricks design set"})})})]}),(0,r.jsx)(L.Z,{checked:w.restrictedArea.bricks?.enabled,onCheckedChange:e=>{u("restrictedArea.bricks.enabled",e,{shouldDirty:!0});let t=0;w.restrictedArea.oxygen?.enabled&&t++,e&&t++,w.restrictedArea.figma?.enabled&&t++,t>=2||u("isBundle",!1)},id:"bricks-enabled"})]}),w.restrictedArea.bricks?.enabled?(0,r.jsxs)("div",{className:"edit-product--variant-content",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(P.__,{label:"Variant price",description:V,htmlFor:"bricksPrice",isRequired:w.restrictedArea.bricks?.enabled}),(0,r.jsx)(B.L,{id:"bricksPrice",type:"number",...t("suggestedBricksPrice",{...B.U,max:200}),max:200})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(P.__,{label:"Remote templates URL",htmlFor:"bricks-design-set-url",isRequired:w.restrictedArea.bricks?.enabled}),(0,r.jsx)("input",{className:"full-width input",id:"bricks-design-set-url",type:"text",readOnly:!w.restrictedArea.bricks?.enabled,...t("restrictedArea.bricks.bricksDesignSetUrl",{required:w.restrictedArea.bricks?.enabled})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(P.__,{label:"Remote templates password",htmlFor:"bricks-design-set-key",isRequired:w.restrictedArea.bricks?.enabled}),(0,r.jsx)("input",{className:"full-width input",id:"bricks-design-set-key",type:"text",readOnly:!w.restrictedArea.bricks?.enabled,...t("restrictedArea.bricks.bricksDesignSetKey",{required:w.restrictedArea.bricks?.enabled})})]})]}):null]}),(0,r.jsxs)("div",{className:"column full-width",children:[(0,r.jsxs)("div",{className:"edit-product--variant",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(m(),{src:"/assets/logo-oxygen-square.svg",alt:"Gutenberg Integration for Core Framework",width:"40",height:"40",className:"radius-s shadow-m"}),(0,r.jsx)("div",{children:(0,r.jsx)("label",{htmlFor:"oxygen-enabled",children:(0,r.jsx)("b",{className:"text-light-90 pointer",children:"Oxygen Builder design set"})})})]}),(0,r.jsx)(L.Z,{checked:w.restrictedArea.oxygen?.enabled,onCheckedChange:e=>{u("restrictedArea.oxygen.enabled",e,{shouldDirty:!0});let t=0;e&&t++,w.restrictedArea.bricks?.enabled&&t++,w.restrictedArea.figma?.enabled&&t++,t>=2||u("isBundle",!1)},id:"oxygen-enabled"})]}),w.restrictedArea.oxygen?.enabled?(0,r.jsxs)("div",{className:"edit-product--variant-content",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(P.__,{label:"Variant price",description:V,htmlFor:"oxygen-design-set-key",isRequired:w.restrictedArea.oxygen?.enabled}),(0,r.jsx)(B.L,{id:"oxygen-design-set-key",...t("suggestedOxygenPrice",{...B.U,max:200}),max:200})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(P.__,{label:"Design set key",htmlFor:"oxygen-design-set-key",isRequired:w.restrictedArea.oxygen?.enabled}),(0,r.jsx)("input",{className:"full-width input",id:"oxygen-design-set-key",type:"text",readOnly:!w.restrictedArea.oxygen?.enabled,...t("restrictedArea.oxygen.oxygenDesignSetKey",{required:w.restrictedArea.oxygen?.enabled})})]})]}):null]}),(0,r.jsxs)("div",{className:"column full-width",children:[(0,r.jsxs)("div",{className:"edit-product--variant",children:[(0,r.jsxs)("div",{className:"row gap-s",children:[(0,r.jsx)(m(),{src:"/assets/figma-logo.png",alt:"Figma",height:40,width:40,style:{objectFit:"contain"},className:"radius-s shadow-m"}),(0,r.jsx)("div",{children:(0,r.jsx)("label",{htmlFor:"figma-enabled",children:(0,r.jsx)("b",{className:"text-light-90 pointer",children:"Figma files"})})})]}),(0,r.jsx)(L.Z,{checked:w.restrictedArea.figma?.enabled,onCheckedChange:e=>{u("restrictedArea.figma.enabled",e,{shouldDirty:!0});let t=0;w.restrictedArea.oxygen?.enabled&&t++,w.restrictedArea.bricks?.enabled&&t++,e&&t++,t>=2||u("isBundle",!1)},id:"figma-enabled"})]}),w.restrictedArea.figma?.enabled?(0,r.jsxs)("div",{className:"edit-product--variant-content",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(P.__,{label:"Variant price",description:V,htmlFor:"figmaPrice",isRequired:w.restrictedArea.figma?.enabled}),(0,r.jsx)(B.L,{id:"figmaPrice",...t("suggestedFigmaPrice",{...B.U,max:200}),max:200})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(P.__,{label:"Figma file",htmlFor:"figma-file",isRequired:w.restrictedArea.figma?.enabled}),(0,r.jsx)("input",{className:"full-width input",id:"figma-file",type:"file",accept:".fig",min:5,max:150,readOnly:!w.restrictedArea.figma?.enabled,ref:F})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(P.__,{label:"Figma public project url",htmlFor:"figma-url",isRequired:w.restrictedArea.figma?.enabled}),(0,r.jsx)("input",{className:"full-width input",id:"figma-url",type:"text",min:5,max:150,readOnly:!w.restrictedArea.figma?.enabled,...t("restrictedArea.figma.figmaUrl")})]})]}):null]}),(0,r.jsxs)("div",{className:"column full-width",children:[(0,r.jsxs)("div",{className:"edit-product--variant",children:[(0,r.jsxs)("div",{className:"row gap-s",children:[(0,r.jsx)(m(),{src:"/assets/bundle-logo.png",alt:"Bundle",width:"40",height:"40"}),(0,r.jsx)("div",{children:(0,r.jsx)("label",{htmlFor:"isBundle",children:(0,r.jsx)("b",{className:"text-light-90 pointer",children:"All-in-One Bundle"})})})]}),(0,r.jsx)(L.Z,{checked:w.isBundle,onCheckedChange:e=>u("isBundle",e,{shouldDirty:!0}),id:"isBundle",disabled:!ea,style:{pointerEvents:ea?"auto":"none",opacity:ea?1:.5}})]}),w.isBundle?(0,r.jsx)("div",{className:"edit-product--variant-content",children:(0,r.jsxs)("div",{children:[" ",(0,r.jsx)(P.__,{label:"Bundle Price",htmlFor:"suggestedBundlePrice",isRequired:w.isBundle}),(0,r.jsx)(B.L,{id:"suggestedBundlePrice",...t("suggestedPrice",{...B.U,required:w.isBundle}),max:er,required:w.isBundle})]})}):null]})]})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsxs)(P.b4,{children:[(0,r.jsx)(P.__,{id:"project",label:"Core Framework project",description:"Specify the Core Framework project to be used for your product.",htmlFor:"core-framework-project",isRequired:!0}),(0,r.jsxs)(o.fC,{className:"RadioGroupRoot variant-selector",defaultValue:w.app
1Data?.type||M.Uv.Default,onValueChange:e=>u("appData",{...w.appData||U.ig,type:e}),children:[(0,r.jsxs)(o.ck,{className:"RadioContainer",value:M.Uv.Default,id:"core-framework-default",children:[(0,r.jsx)("div",{className:"RadioGroupItem",children:(0,r.jsx)(o.z$,{className:"RadioGroupIndicator"})}),(0,r.jsxs)("label",{className:"Label text-light-80 pointer",htmlFor:"core-framework-default",children:[(0,r.jsx)("b",{className:"text-light",children:"Default"})," - My product is using default Core Framework."]})]}),(0,r.jsxs)(o.ck,{className:"RadioContainer",value:M.Uv.Modified,id:"core-framework-modified",children:[(0,r.jsx)("div",{className:"RadioGroupItem",children:(0,r.jsx)(o.z$,{className:"RadioGroupIndicator"})}),(0,r.jsxs)("label",{className:"Label text-light-80 pointer",htmlFor:"core-framework-modified",children:[(0,r.jsx)("b",{className:"text-light text-left",children:"Modified"}),(0,r.jsxs)("span",{className:"text-left",children:[" ","- My product is using a modified version of Core Framework. Choose from the list of your web projects below."]})]}),(0,r.jsxs)("div",{className:"column col-start-2 gap-xs full-width margin-top-s",children:[Object.entries(e?.appData?.presets||{}).filter(e=>{let[,t]=e;return!!t}).filter(e=>{let[,t]=e;return t.isPublic})?(0,r.jsxs)("select",{className:"input",style:{width:"fit-content",height:"fit-content"},onChange:e=>{let t=e.target.value;t&&u("appData",{...w.appData||U.ig,id:t})},value:w.appData?.id,children:[(0,r.jsx)("option",{value:"",disabled:!0,hidden:!0,children:"Select a project"}),Object.entries(e?.appData?.presets||{}).filter(e=>{let[,t]=e;return!!t}).filter(e=>{let[,t]=e;return t.isPublic}).map(e=>{let[t,i]=e;return(0,r.jsx)("option",{value:i.id,children:i.name},t)})]}):(0,r.jsx)("p",{className:"text-light-70 text-s",children:"No presets available. Create a web project first."}),(0,r.jsx)("p",{className:"text-light-50 text-s",children:"Users will be able to install your product will be able to download or import the latest version of your Core Framework project. You can update this project at any time."})]})]}),(0,r.jsxs)(o.ck,{className:"RadioContainer",value:M.Uv.None,id:"c
1ore-framework-none",children:[(0,r.jsx)("div",{className:"RadioGroupItem",children:(0,r.jsx)(o.z$,{className:"RadioGroupIndicator"})}),(0,r.jsxs)("label",{className:"Label text-light-80 pointer",htmlFor:"core-framework-none",children:[(0,r.jsx)("b",{className:"text-light",children:"Not using"})," -"," ",`My product doesn't 2 use Core Framework.`]})]})]})]}),(0,r.jsx)(P.Hr,{}),(0,r.jsx)("p",{className:"text-light-70 text-m margin-top-l",children:w.isComingSoon?(0,r.jsxs)(r.Fragment,{children:[`Product will be visible in the marketplace as a "coming soon" 3 product after it is approved by the Core Framework team. You can 4 read more about the`,(0,r.jsx)(p(),{href:"/docs/faq#approval-process",className:"text-light",children:"approval process here"}),". You will be notified by email when your product is approved. Our team may ask you to make changes to your product before it is approved [1]."]}):(0,r.jsxs)(r.Fragment,{children:["Product will be available for purchase after it is approved by the Core Framework team. You can read more about the"," ",(0,r.jsx)(p(),{href:"/docs/faq#approval-process",className:"text-light",children:"approval process here"}),". You will be notified by email when your product is approved. Our team may ask you to make changes to your product before it is approved [1]."]})}),(0,r.jsxs)("div",{className:"columns-2 column--on-s gap-s items-center full-width ",children:[(0,r.jsx)("button",{type:"submit","data-submit":"draft",className:(0,d.Z)("full-width btn slight",{"pointer-events-none opacity-70":g.isSubmitting}),children:g.isSubmitting?(0,r.jsx)(q.Z,{}):"Save as Draft"}),(0,r.jsx)("button",{type:"submit","data-submit":"submit",className:(0,d.Z)("full-width btn primary",{"pointer-events-none opacity-70":g.isSubmitting}),children:g.isSubmitting?(0,r.jsx)(q.Z,{}):w.isComingSoon?"Submit for Coming Soon page review":"Submit for review"})]}),X?(0,r.jsxs)("div",{className:"padding-s border-error-10 border bg-error-5 radius-m full-width row gap-s items-center items-middle",children:[(0,r.jsx)(n.Z,{className:"svg-m text-error"}),(0,r.jsx)("p",{className:"text-error text-m",children:X})]}):null,(0,r.jsxs)("p",{className:"text-light-70 text-s",children:["Fields marked with ",(0,r.jsx)(P.um,{})," are required."]}),(0,r.jsx)("p",{className:"text-light-70 text-s",children:"[1] We may ask you to make changes to your product before it is approved. This may include changes to the product description, product images, product title, product price, or product slug. We reserve the right to reject any product for any reason."})]})})]})};var Y=i(97981),W=!0,J=()=>(0,r.jsx)(Y.Z,{children:(0,r.jsx)(s.Z,{title:"Create Product",customLayout:!0,children:(0,r.jsx)(T,{})})})}},function(e){e.O(0,[6911,8368,1509,4712,139,7536,5165,3648,2679,9017,5014,2888,9774,179],function(){return e(e.s=33590)}),_N_E=e.O()}]);
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.