import{T as u,c as d,a as i,b as s,t as e,w as r,u as n,o as m,q as _}from"./app-13978987.js";import{_ as p}from"./PageHeader-8c638686.js";import{_ as h}from"./AdminLayout-bd13ff9d.js";import{_ as v}from"./SpinnerBtn-cb152833.js";import"./dropdown-45d66330.js";const f={class:"container flex-grow p-4 sm:p-6"},b={class:"space-y-6"},y={class:"flex"},g={class:"mt-5 flex-1"},w={class:"mt-5 flex-1"},E={class:"card"},S={class:"card-body"},N={class:"mt-2"},q=["value"],B={class:"mt-2"},C=["value"],$={class:"mt-2"},k=["value"],A={class:"mt-2"},D=["value"],P={class:"mt-2"},U=s("input",{type:"text",name:"password",class:"input",value:""},null,-1),V={class:"mt-2"},j={class:"select",name:"status"},M=["selected"],O=["selected"],T={class:"mt-2"},x={layout:h},K=Object.assign(x,{__name:"Edit",props:["customer","segments","buttons"],setup(o){const l=o,a=u({...l.customer}),c=()=>{let t=route("admin.customer.update",{id:l.customer.id});a.put(t,{onSuccess:()=>{_.success("Customer has been updated successfully")}})};return(t,z)=>(m(),d("main",f,[i(p,{title:t.trans("Edit Customers"),buttons:o.buttons},null,8,["title","buttons"]),s("div",b,[s("div",y,[s("div",g,[s("strong",null,e(t.trans("Edit User")),1),s("p",null,e(t.trans("Edit user profile information")),1)]),s("div",w,[s("form",{onSubmit:r(c,["prevent"])},[s("div",E,[s("div",S,[s("div",N,[s("label",null,e(t.trans("Name")),1),s("input",{type:"text",name:"name",required:"",class:"input",value:n(a).name},null,8,q)]),s("div",B,[s("label",null,e(t.trans("Email")),1),s("input",{type:"email",name:"email",required:"",class:"input",value:n(a).email},null,8,C)]),s("div",$,[s("label",null,e(t.trans("Phone")),1),s("input",{type:"text",name:"phone",class:"input",value:n(a).phone},null,8,k)]),s("div",A,[s("label",null,e(t.trans("Address")),1),s("input",{type:"text",name:"address",class:"input",value:n(a).address},null,8,D)]),s("div",P,[s("label",null,e(t.trans("New Password")),1),U]),s("div",V,[s("label",null,e(t.trans("Status")),1),s("select",j,[s("option",{value:"1",selected:n(a).status==1},e(t.trans("Active")),9,M),s("option",{value:"0",selected:n(a).status==0},e(t.trans("Deactive")),9,O)])]),s("div",T,[i(v,{classes:"btn btn-primary",processing:n(a).processing,"btn-text":t.trans("Save Changes")},null,8,["processing","btn-text"])])])])],32)])])])]))}});export{K as default};
