import{_ as g,d as $,a as h,e as w,w as a,g as t,i as s,t as l,c as r,h as C,o as n}from"./app-D7zH3Nl5.js";import{a as k}from"./apiAdmin-B6-2qm0d.js";import{D}from"./DownloadOutlined-BNxYRljn.js";import{D as T,a as B}from"./index-EPVsqf28.js";import{T as V}from"./index-ClJ_H-9Y.js";import{B as N}from"./useFlexGapSupport-CpBR-RD-.js";import{a as S,_ as q}from"./index-Cv7zOydE.js";import{_ as A}from"./index-BivgQiQE.js";const R=$({components:{DownloadOutlined:D},props:["data","visible","pageTitle"],setup(e,{emit:i}){const{formatDateTime:d,formatAmountCurrency:m,leaveRequestColors:p}=h(),{loading:_,rules:o}=k();return{rules:o,loading:_,leaveRequestColors:p,formatDateTime:d,formatAmountCurrency:m,onClose:()=>{o.value={},i("close")}}}}),W={key:0,style:{"white-space":"pre-wrap"}},E={key:0,style:{"white-space":"pre-wrap"}},I={key:1};function O(e,i,d,m,p,_){const o=B,u=V,f=T,c=S,y=q,b=N,v=A;return n(),w(v,{title:e.pageTitle,width:720,open:e.visible,"body-style":{paddingBottom:"80px"},"footer-style":{textAlign:"right"}},{footer:a(()=>[t(b,{key:"back",type:"primary",onClick:e.onClose},{default:a(()=>[s(l(e.$t("common.cancel")),1)]),_:1},8,["onClick"])]),default:a(()=>[t(y,{gutter:16},{default:a(()=>[t(c,{xs:24,sm:24,md:24,lg:24},{default:a(()=>[t(f,{layout:"vertical",contentStyle:{fontWeight:500,marginBottom:"5px"},labelStyle:{fontWeight:"bold"}},{default:a(()=>[t(o,{label:e.$t("leave.user")},{default:a(()=>[s(l(e.data.user?e.data.user.name:"-"),1)]),_:1},8,["label"]),t(o,{label:e.$t("leave.leave_type")},{default:a(()=>[s(l(e.data.leave_type?e.data.leave_type.name:"-"),1)]),_:1},8,["label"]),t(o,{label:e.$t("leave.start_date")},{default:a(()=>[s(l(e.formatDateTime(e.data.start_date)),1)]),_:1},8,["label"]),t(o,{label:e.$t("leave.end_date")},{default:a(()=>[s(l(e.formatDateTime(e.data.start_date)),1)]),_:1},8,["label"]),t(o,{label:e.$t("leave.is_half_day")},{default:a(()=>[s(l(e.data.is_half_day?e.$t("common.yes"):e.$t("common.no"))+" ",1),e.data&&e.data.is_half_day==1?(n(),r("div",W,l("-"+e.$t(`common.${e.data.half_leave}`)),1)):C("",!0)]),_:1},8,["label"]),t(o,{label:e.$t("leave.status")},{default:a(()=>[t(u,{color:e.leaveRequestColors[e.data.status]},{default:a(()=>[s(l(e.$t(`common.${e.data.status}`)),1)]),_:1},8,["color"])]),_:1},8,["label"]),t(o,{label:e.$t("leave.reason")},{default:a(()=>[e.data&&e.data.reason?(n(),r("div",E,l(e.data.reason),1)):(n(),r("span",I,"-"))]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1},8,["title","open"])}const M=g(R,[["render",O]]);export{M as V};
