import{al as C,bi as D,c as y,d,bh as v,r as m,e as S,j as t,f as e,F as O,S as l,T as a,R as h,bp as u,ay as p,o as F}from"./index.8f299a7d.js";import{H as B}from"./HeaderBreadcrumbs.da67f38c.js";import{R as i}from"./RHFCheckbox.5107bbb8.js";import{P as E}from"./Page.4c1db0aa.js";import{G as n}from"./Grid.358b274d.js";import{C as I}from"./Card.1ec83a31.js";import"./FormControlLabel.4a0a74ee.js";import"./Checkbox.8fe02966.js";function J(){C(),D();const f=y().shape({name:d().required("Name is required"),code:d().required("Corporate Code is required"),active:v().required("Corporate Status is required")}),x=m.exports.useMemo(()=>({code:""}),[]),s=S({resolver:F(f),defaultValues:x}),{reset:q,watch:P,control:H,setValue:N,getValues:R,setError:V,handleSubmit:g,formState:{isSubmitting:j}}=s,b=async r=>{console.log(r)};m.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 t(E,{title:"Create Benefit",children:[e(B,{heading:"Create Benefit",links:[{name:"Dashboard",href:"/dashboard"},{name:"Corporates",href:"/corporates"},{name:"Corporate Name",href:"/corporates/"+id},{name:"Benefits",href:"/corporates/"+id+"/benefits"},{name:"Create",href:"/corporates/"+id+"/benefits/create"}]}),e(n,{container:!0,spacing:2,children:e(n,{item:!0,xs:12,children:e(I,{sx:{p:2},children:e(O,{methods:s,onSubmit:g(b),children:t(l,{spacing:3,children:[e(a,{variant:"h6",children:"Benefit Detail"}),e(h,{name:"name",label:"Benefit Name"}),e(h,{name:"code",label:"Benefit Code"}),e(a,{variant:"h6",children:"Benefit Configuration"}),e(u,{orientation:"horizontal",flexItem:!0}),t(l,{spacing:3,divider:e(u,{orientation:"horizontal",flexItem:!0}),children:[t(l,{spacing:2,children:[e(i,{name:"a",label:"Outpatient"}),c.map(r=>t(p,{in:!0,timeout:"auto",unmountOnExit:!0,children:[e(a,{children:r.category}),e(n,{container:!0,children:r.childs.map(o=>e(n,{item:!0,xs:6,children:e(i,{name:o.code,label:o.name})}))})]})),e(a,{children:"Admin Fee"}),e(n,{container:!0,children:c.map(r=>e(n,{item:!0,xs:4,children:e(i,{name:"cat",label:r.category})}))})]}),t(l,{spacing:2,children:[e(i,{name:"a",label:"Inpatient"}),c.map(r=>t(p,{in:!0,timeout:"auto",unmountOnExit:!0,children:[e(a,{children:r.category}),e(n,{container:!0,children:r.childs.map(o=>e(n,{item:!0,xs:6,children:e(i,{name:o.code,label:o.name})}))})]})),e(a,{children:"Admin Fee"}),e(n,{container:!0,children:c.map(r=>e(n,{item:!0,xs:4,children:e(i,{name:"cat",label:r.category})}))})]})]})]})})})})})]})}export{J as default};
