1import{d as g,l as f,o as _,m as h,w as n,a as e,e as t,f as d,V as y,R as v,h as x,i as w,P as B,c as V,F as S}from"./index-7870f41c.js";import{V as b}from"./VButton-ce4b1c5e.js";import{_ as k}from"./VDialog.vue_vue_type_script_setup_true_lang-20570b6c.js";import{V as u}from"./VCard-04b8c072.js";import{V as C}from"./VPageHeader-df08816c.js";import"./dialog-eb2c3056.js";import"./use-root-containers-e428e2c2.js";import"./transition-a90df4e0.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="e35aa41a-499e-4595-9797-8c30696135c8",l._sentryDebugIdIdentifier="sentry-dbid-e35aa41a-499e-4595-9797-8c30696135c8")}catch{}})();const D={class:"space-y-12"},I={class:"grid grid-cols-1 gap-y-4 lg:grid-cols-3 lg:gap-x-8 lg:gap-y-4"},N=e("div",null,[e("h2",{class:"font-semibold leading-7 text-slate-700"},"Brand Description"),e("p",{class:"text-sm leading-6 text-slate-600"},"Specify brand name, description and site")],-1),F={class:"grid grid-cols-1 gap-y-4 lg:grid-cols-3 lg:gap-x-8 lg:gap-y-4"},E=e("div",null,[e("h2",{class:"font-semibold leading-7 text-slate-700"},"Contact Information"),e("p",{class:"text-sm leading-6 text-slate-600"},"Enter contact name, email and phone number")],-1),P={class:"grid grid-cols-1 lg:grid-cols-3 lg:gap-x-8 lg:gap-y-4"},q=e("div",null,null,-1),$={class:"flex items-center gap-4"},R=g({__name:"BrandForm",props:{brand:{}},emits:["submit"],setup(l,{emit:i}){const r=async a=>{const m=await y.create({brand:{name:a.name,description:a.description,website:a.website},primary_contact:{name:a.contactName,email:a.contactEmail,phone:a.contactPhone}});i("submit",m)};return(a,m)=>{const s=f("FormKit");return _(),h(s,{type:"form",value:a.brand,actions:!1,"incomplete-message":!1,onSubmit:r},{default:n(()=>[e("div",D,[e("div",I,[N,t(u,{class:"md:col-span-2 space-y-6"},{default:n(()=>[t(s,{type:"text",name:"name",label:"Brand name",placeholder:"FlyLondon",help:"Shortest recognizable name",validation:"required"}),t(s,{type:"text",name:"description",label:"Description",placeholder:"Paragliding for everyone",help:"One line description of the brand",validation:"length:0,100"}),t(s,{type:"text",name:"website",label:"Website",placeholder:"https://flylondon.com",help:"Brand website"})]),_:1})]),e("div",F,[E,t(u,{class:"md:col-span-2 space-y-6"},{default:n(()=>[t(s,{type:"text",name:"contactName",label:"Contact name",placeholder:"John Doe",help:"This person will be primary contact for the brand."}),t(s,{type:"text",name:"contactEmail",label:"Contact's email",placeholder:"[email protected]",validation:"required|email"}),t(s,{type:"mask",mask:"+44 (####) ######",name:"contactPhone",label:"Contact's phone number",validation:"required|string|length:1,30",help:"Required as a backup, primary communications will be on email."})]),_:1})]),e("div",P,[q,e("div",$,[t(b,{type:"submit"},{default:n(()=>[d("Save Brand")]),_:1})])])])]),_:1},8,["value"])}}}),T=e("div",{class:"space-y-4 mt-2"},[e("p",null,"Next, please add your social(s) and location(s) before creating your campaign(s)")],-1),H={class:"flex gap-4 mt-4"},W=g({__name:"new",setup(l){const i=v(),r=x(),a=w(!1),m=async o=>{await r.loadBrands(),r.selectBrand(o.id),a.value=!0},s=async()=>{var o;await i.push({name:"business.socials",params:{brandId:(o=r.currentBrand)==null?void 0:o.id}})};return B(a,(o,c)=>{c===!0&&o===!1&&s()}),(o,c)=>(_(),V(S,null,[t(C,{class:"mb-4"},{description:n(()=>[d(" If you manage several brands please make sure to separate them. ")]),default:n(()=>[d(" New Brand ")]),_:1}),t(R,{onSubmit:c[0]||(c[0]=p=>m(p))}),t(k,{modelValue:a.value,"onUpdate:modelValue":c[1]||(c[1]=p=>
1a.value=p)},{title:n(()=>[d("Your brand has been created")]),default:n(()=>[T,e("div",H,[t(b,{onClick:s},{default:n(()=>[d(" Done ")]),_:1})])]),_:1},8,["modelValue"])],64))}});export{W as default}; 2//# sourceMappingURL=new-7d6f0c94.js.map
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.