module.exports=[703130,a=>{"use strict";var b=a.i(187924),c=a.i(497895);a.s(["Card",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card",className:(0,c.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",a),...d})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-6",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-muted-foreground text-sm",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("leading-none font-semibold",a),...d})}])},254161,a=>{"use strict";var b=a.i(187924),c=a.i(811011),d=a.i(400187),e=a.i(497895);let f=(0,d.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});a.s(["Badge",0,function({className:a,variant:d,asChild:g=!1,...h}){let i=g?c.Slot:"span";return(0,b.jsx)(i,{"data-slot":"badge",className:(0,e.cn)(f({variant:d}),a),...h})}])},277225,a=>{"use strict";var b=a.i(187924),c=a.i(238246),d=a.i(572131),e=a.i(50944),f=a.i(703130),g=a.i(340695),h=a.i(254161),i=a.i(133951),j=a.i(725944);a.s(["default",0,function(){let a=(0,e.useParams)().id,k=(0,d.useMemo)(()=>(0,j.getApiService)(),[]),{error:l}=(0,i.useToast)(),[m,n]=(0,d.useState)(null),[o,p]=(0,d.useState)(!0);return(0,d.useEffect)(()=>{(async()=>{p(!0);let b=await k.getEmployee(a);b.success&&b.data?n(b.data):l("Failed to load employee",b.error),p(!1)})()},[k,a,l]),(0,b.jsxs)("div",{className:"flex-1 space-y-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-3xl font-bold text-foreground",children:"Employee Details"}),(0,b.jsx)("p",{className:"text-muted-foreground mt-2",children:"View employee information"})]}),(0,b.jsx)(c.default,{href:"/accounts/employees",children:(0,b.jsx)(g.Button,{variant:"outline",children:"Back"})})]}),(0,b.jsxs)(f.Card,{className:"bg-card border-border",children:[(0,b.jsx)(f.CardHeader,{children:(0,b.jsx)(f.CardTitle,{children:"Employee"})}),(0,b.jsx)(f.CardContent,{children:o?(0,b.jsx)("p",{className:"text-muted-foreground",children:"Loading employee..."}):m?(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Code"}),(0,b.jsx)("p",{className:"font-medium text-foreground",children:m.code})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Name"}),(0,b.jsx)("p",{className:"font-medium text-foreground",children:m.name})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Phone"}),(0,b.jsx)("p",{className:"font-medium text-foreground",children:m.phone||"-"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Email"}),(0,b.jsx)("p",{className:"font-medium text-foreground",children:m.email||"-"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Designation"}),(0,b.jsx)("p",{className:"font-medium text-foreground",children:m.designation||"-"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Status"}),(0,b.jsx)(h.Badge,{variant:m.active?"default":"secondary",children:m.active?"Active":"Inactive"})]})]}):(0,b.jsx)("p",{className:"text-muted-foreground",children:"Employee not found."})})]})]})}])}];

//# sourceMappingURL=_0-snmq_._.js.map