import{m as u,j as e,L as j}from"./app-D_lWdAF1.js";import{I as n}from"./input-error-Dz46bbCi.js";import{B as d,A as h}from"./Add-B_lToW0R.js";import{F as m,C as g}from"./Close-CmjhMxa1.js";import{I as l}from"./input-iieIymNx.js";import{A as b}from"./app-layout-DBWaGSby.js";import{T as f,G as r}from"./Typography-D06EX7-K.js";import{L as C}from"./loader-circle-CqvjZacN.js";import"./app-gFGt7Tbg.js";import"./app-logo-icon-B18IWF-o.js";import"./slots-DhmpWYGS.js";import"./index-DKsctv8k.js";import"./index--DsFJTFe.js";const I=[{title:"Interior Designers",href:"/interior-designers"},{title:"Create",href:"#"}];function J(){const{data:t,setData:a,post:c,processing:i,errors:o,reset:p}=u({name:"",mobile:"",email:""}),x=s=>{s.preventDefault(),c(route("interior-designers.store"),{onFinish:()=>p("password","password_confirmation")})};return e.jsxs(b,{breadcrumbs:I,children:[e.jsx(j,{title:"Add Interior Designer"}),e.jsxs(m,{children:[e.jsx(m.Title,{children:e.jsx(f,{variant:"h6",gutterBottom:!0,children:"Create Interior Designer"})}),e.jsx(m.Body,{children:e.jsx("form",{onSubmit:x,children:e.jsxs(r,{container:!0,spacing:2,children:[e.jsxs(r,{size:12,children:[e.jsx(l,{id:"name",autoFocus:!0,tabIndex:1,autoComplete:"name",value:t.name,onChange:s=>a("name",s.target.value),disabled:i,label:"Name"}),e.jsx(n,{message:o.name,className:"mt-2"})]}),e.jsxs(r,{size:12,children:[e.jsx(l,{label:"Mobile",value:t.mobile,onChange:s=>a("mobile",s.target.value)}),e.jsx(n,{message:o.mobile,className:"mt-2"})]}),e.jsxs(r,{size:12,children:[e.jsx(l,{label:"Email",value:t.email,onChange:s=>a("email",s.target.value)}),e.jsx(n,{message:o.email,className:"mt-2"})]}),e.jsxs(r,{size:12,children:[e.jsxs(d,{type:"submit",startIcon:e.jsx(h,{}),disabled:i,children:[i&&e.jsx(C,{className:"h-4 w-4 animate-spin"}),"Create"]}),e.jsx(d,{style:{marginLeft:"10px"},color:"error",href:route("interior-designers.index"),startIcon:e.jsx(g,{}),children:"Cancel"})]})]})})})]})]})}export{J as default};
