import{al as D,bi as C,c as y,d as m,bh as S,r as h,e as v,j as n,f as e,F as O,S as s,T as t,R as l,bp as u,ay as p,o as P}from"./index.8f299a7d.js";import{H as F}from"./HeaderBreadcrumbs.da67f38c.js";import{R as i}from"./RHFCheckbox.5107bbb8.js";import{P as E}from"./Page.4c1db0aa.js";import{G as r}from"./Grid.358b274d.js";import{C as Y}from"./Card.1ec83a31.js";import"./FormControlLabel.4a0a74ee.js";import"./Checkbox.8fe02966.js";function L(){D(),C();const f=y().shape({name:m().required("Name is required"),code:m().required("Corporate Code is required"),active:S().required("Corporate Status is required")}),x=h.exports.useMemo(()=>({code:""}),[]),d=v({resolver:P(f),defaultValues:x}),{reset:I,watch:q,control:M,setValue:H,getValues:N,setError:R,handleSubmit:g,formState:{isSubmitting:V}}=d,b=async a=>{console.log(a)};h.exports.useState(!1);const c=[{category:"General Practitioner",childs:[{name:"External Doctor Online",code:"gp-external-doctor-online"},{name:"External Doctor Offline",code:"gp-external-doctor-offline"},{name:"Internal Doctor Online",code:"gp-internal-doctor-online"},{name:"Internal Doctor Offline",code:"gp-internal-doctor-offline"}]},{category:"Specialist",childs:[{name:"External Doctor Online",code:"sp-external-doctor-online"},{name:"External Doctor Offline",code:"sp-external-doctor-offline"},{name:"Internal Doctor Online",code:"sp-internal-doctor-online"},{name:"Internal Doctor Offline",code:"sp-internal-doctor-offline"}]},{category:"Medicines",childs:[{name:"Vitamins",code:"medicines-vitamins"},{name:"Delivery Fee",code:"medicines-delivery-fee"}]}];return n(E,{title:"Create Plan",children:[e(F,{heading:"Create Plan",links:[{name:"Dashboard",href:"/dashboard"},{name:"Corporates",href:"/corporates"},{name:"Corporate Name",href:"/corporates/"+id},{name:"Plans",href:"/corporates/"+id+"/plans"},{name:"Create",href:"/corporates/"+id+"/plans/create"}]}),e(r,{container:!0,spacing:2,children:e(r,{item:!0,xs:12,children:e(Y,{sx:{p:2},children:e(O,{methods:d,onSubmit:g(b),children:n(s,{spacing:3,children:[e(t,{variant:"h6",children:"Plan Detail"}),e(l,{name:"name",label:"Name"}),e(l,{name:"code",label:"Code"}),e(l,{name:"limit",label:"Limit"}),e(l,{name:"start",label:"Start (YYYY-MM-DD)"}),e(l,{name:"end",label:"End (YYYY-MM-DD)"}),e(t,{variant:"h6",children:"Benefit Configuration"}),e(u,{orientation:"horizontal",flexItem:!0}),n(s,{spacing:3,divider:e(u,{orientation:"horizontal",flexItem:!0}),children:[n(s,{spacing:2,children:[e(i,{name:"a",label:"Outpatient"}),c.map(a=>n(p,{in:!0,timeout:"auto",unmountOnExit:!0,children:[e(t,{children:a.category}),e(r,{container:!0,children:a.childs.map(o=>e(r,{item:!0,xs:6,children:e(i,{name:o.code,label:o.name})}))})]})),e(t,{children:"Admin Fee"}),e(r,{container:!0,children:c.map(a=>e(r,{item:!0,xs:4,children:e(i,{name:"cat",label:a.category})}))})]}),n(s,{spacing:2,children:[e(i,{name:"a",label:"Inpatient"}),c.map(a=>n(p,{in:!0,timeout:"auto",unmountOnExit:!0,children:[e(t,{children:a.category}),e(r,{container:!0,children:a.childs.map(o=>e(r,{item:!0,xs:6,children:e(i,{name:o.code,label:o.name})}))})]})),e(t,{children:"Admin Fee"}),e(r,{container:!0,children:c.map(a=>e(r,{item:!0,xs:4,children:e(i,{name:"cat",label:a.category})}))})]})]})]})})})})})]})}export{L as default};
