import{T as p,c as d,o as u,b as e,t as a,d as c,a as n,u as r,F as f}from"./app-B4kV47qU.js";import{_ as x}from"./UserLayout-DG2qUs8x.js";import{_ as b}from"./SpinnerBtn-B3fjBeDL.js";import{_ as i}from"./InputField-DXo1g-Zb.js";import"./sharedComposable-VJJUONp6.js";import"./toastComposable-CvcyPmJb.js";import"./Modal-ChMy0A7y.js";import"./modalStore-BgORG3Nn.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ToastrContainer-Cfx6wOd2.js";import"./AssetModal-vtiWQmiY.js";import"./IntersectionObserver-DbdokySM.js";import"./assetStore-cDK0Afhq.js";const w={class:"relative mx-auto mb-6 flex max-w-2xl justify-between overflow-hidden px-4"},_={class:"flex min-w-0 flex-col items-center gap-1"},h={class:"max-w-full overflow-hidden text-ellipsis whitespace-nowrap text-center text-xs md:max-w-[150px]"},v={class:"flex min-w-0 flex-col items-center gap-1"},g={class:"max-w-full overflow-hidden text-ellipsis whitespace-nowrap text-center text-xs md:max-w-[150px]"},y={class:"card mx-auto max-w-2xl p-6"},k={class:"mb-3 text-lg font-semibold"},V={class:"text-xs text-red-500"},D={class:"flex justify-end"},W=Object.assign({layout:x},{__name:"Create",props:["platforms"],setup(j){const s=p({name:"",phone_number:null}),m=()=>{s.post(route("user.whatsapp-web.platforms.store"))};return(o,t)=>(u(),d(f,null,[e("div",w,[e("div",_,[t[2]||(t[2]=e("span",{class:"z-10 flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary-700 text-white"}," 1 ",-1)),e("span",h,a(o.trans("Create Device")),1)]),e("div",v,[t[3]||(t[3]=e("span",{class:"z-10 flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-primary-500 bg-dark-50 dark:bg-dark-800"}," 2 ",-1)),e("span",g,a(o.trans("Connect Device")),1)]),t[4]||(t[4]=e("hr",{class:"absolute left-1/2 top-5 z-0 h-1 w-[calc(100%-5rem)] -translate-x-1/2 border-none bg-primary-700 md:block"},null,-1))]),e("div",y,[e("p",k,a(o.trans("Create Device")),1),e("form",{class:"space-y-3",onSubmit:c(m,["prevent"])},[n(i,{label:"Device Title",modelValue:r(s).name,"onUpdate:modelValue":t[0]||(t[0]=l=>r(s).name=l),placeholder:"My Personal Device",error:r(s).errors.name},null,8,["modelValue","error"]),n(i,{type:"tel",label:"Whatsapp Number",modelValue:r(s).phone_number,"onUpdate:modelValue":t[1]||(t[1]=l=>r(s).phone_number=l),placeholder:"Ex: 8801234567890",error:r(s).errors.phone_number},null,8,["modelValue","error"]),e("p",V,a(o.trans("Note: Number must be start with country code")),1),e("div",D,[n(b,{processing:r(s).processing,"btn-text":o.trans("Submit")},null,8,["processing","btn-text"])])],32)])],64))}});export{W as default};
