import{T as _,c as i,a as p,b as s,w as f,t as r,d,v as c,u as o,e as m,f as v,F as w,r as b,g,o as l}from"./app-13978987.js";import{_ as h}from"./SpinnerBtn-cb152833.js";import{_ as k}from"./AdminLayout-bd13ff9d.js";import{_ as y}from"./PageHeader-8c638686.js";import"./dropdown-45d66330.js";const V={class:"container p-4 sm:p-6"},C={class:"space-y-6"},E={class:"grid grid-cols-12"},q={class:"lg:col-span-5"},N={class:"card-wrapper lg:col-span-7"},U={class:"card"},$={class:"card-body"},A={class:"mb-2"},B={for:"name"},M={key:0,class:"invalid-feedback text-danger d-block"},P={class:"mb-2"},S={for:"email"},x={key:0,class:"invalid-feedback text-danger d-block"},D={class:"mb-2"},F={for:"password"},T={key:0,class:"invalid-feedback text-danger d-block"},j={class:"mb-2"},L={for:"password_confirmation"},O={key:0,class:"invalid-feedback text-danger d-block"},R={class:"mb-2"},z=["value"],G={key:0,class:"invalid-feedback text-danger d-block"},H={class:"from-group row mt-3"},I={class:"col-lg-12"},J=g({layout:k}),Z=Object.assign(J,{__name:"Create",props:["roles"],setup(u){const e=_({name:null,email:null,password:null,password_confirmation:null,roles:null});return(n,t)=>(l(),i("main",V,[p(y),s("div",C,[s("form",{onSubmit:t[5]||(t[5]=f(a=>o(e).post(n.route("admin.admin.store")),["prevent"]))},[s("div",E,[s("div",q,[s("strong",null,r(n.trans("Create Admin")),1),s("p",null,r(n.trans("add admin profile information")),1)]),s("div",N,[s("div",U,[s("div",$,[s("div",A,[s("label",B,r(n.trans("Name")),1),d(s("input",{type:"text",placeholder:"Enter Name","onUpdate:modelValue":t[0]||(t[0]=a=>o(e).name=a),class:"input",id:"name",required:"",autocomplete:"off"},null,512),[[c,o(e).name]]),o(e).errors.name?(l(),i("div",M,r(o(e).errors.name),1)):m("",!0)]),s("div",P,[s("label",S,r(n.trans("Email")),1),d(s("input",{type:"email",placeholder:"Enter Email","onUpdate:modelValue":t[1]||(t[1]=a=>o(e).email=a),name:"email",class:"input",id:"email",required:"",autocomplete:"off"},null,512),[[c,o(e).email]]),o(e).errors.email?(l(),i("div",x,r(o(e).errors.email),1)):m("",!0)]),s("div",D,[s("label",F,r(n.trans("Password")),1),d(s("input",{type:"password",placeholder:"Enter password","onUpdate:modelValue":t[2]||(t[2]=a=>o(e).password=a),name:"password",class:"input",id:"password",required:"",autocomplete:"off"},null,512),[[c,o(e).password]]),o(e).errors.password?(l(),i("div",T,r(o(e).errors.password),1)):m("",!0)]),s("div",j,[s("label",L,r(n.trans("Confirm Password")),1),d(s("input",{type:"password",placeholder:"Confirm Password","onUpdate:modelValue":t[3]||(t[3]=a=>o(e).password_confirmation=a),name:"password_confirmation",class:"input",id:"password_confirmation",required:"",autocomplete:"off"},null,512),[[c,o(e).password_confirmation]]),o(e).errors.password_confirmation?(l(),i("div",O,r(o(e).errors.password_confirmation),1)):m("",!0)]),s("div",R,[s("label",null,r(n.trans("Assign Roles")),1),d(s("select",{required:"","onUpdate:modelValue":t[4]||(t[4]=a=>o(e).roles=a),id:"roles",class:"select"},[(l(!0),i(w,null,b(u.roles,a=>(l(),i("option",{key:a.id,value:a.name},r(a.name),9,z))),128))],512),[[v,o(e).roles]]),o(e).errors.roles?(l(),i("div",G,r(o(e).errors.roles),1)):m("",!0)]),s("div",H,[s("div",I,[p(h,{processing:o(e).processing,"btn-text":n.trans("Create Admin")},null,8,["processing","btn-text"])])])])])])])],32)])]))}});export{Z as default};
