import{j as e,H as x,L as c}from"./app-BQEFzdw6.js";import{A as l}from"./AppLayout-kozc03ce.js";import{P as n}from"./PageHeader-Bj1OQnqr.js";import{B as m}from"./Badge-CiLdjUlo.js";import{a as d}from"./formatters-ClI693-F.js";import"./useThemeColor-qPCpc713.js";import"./dayjs.min-BDUBcDj6.js";function g({leave:s}){var r,t,a,i;return e.jsxs(l,{children:[e.jsx(x,{title:"Leave Request"}),e.jsx(n,{title:"Leave Request",back:route("hr.leaves.index")}),e.jsx("div",{className:"p-4 sm:p-6 max-w-xl",children:e.jsx("div",{className:"card p-6",children:e.jsxs("dl",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-4",children:[e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Employee"}),e.jsx("dd",{className:"font-medium",children:e.jsx(c,{href:route("hr.employees.show",(r=s.employee)==null?void 0:r.id),className:"text-primary-600 hover:underline",children:(t=s.employee)==null?void 0:t.name})})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Leave Type"}),e.jsx("dd",{children:((a=s.leave_type)==null?void 0:a.name)??"—"})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"From"}),e.jsx("dd",{children:d(s.from_date)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"To"}),e.jsx("dd",{children:d(s.to_date)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Days"}),e.jsx("dd",{className:"font-semibold",children:s.days})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Status"}),e.jsx("dd",{children:e.jsx(m,{status:s.status})})]}),s.reason&&e.jsxs("div",{className:"col-span-2",children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Reason"}),e.jsx("dd",{children:s.reason})]}),s.reviewed_by&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Reviewed By"}),e.jsx("dd",{children:(i=s.reviewed_by)==null?void 0:i.name})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Reviewed At"}),e.jsx("dd",{children:d(s.reviewed_at)})]}),s.review_note&&e.jsxs("div",{className:"col-span-2",children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Review Note"}),e.jsx("dd",{children:s.review_note})]})]})]})})})]})}export{g as default};
