import{u as v,_ as S,d as w,a0 as C,e as $,w as o,g as a,i as d,t as c,b as h,o as O}from"./app-D7zH3Nl5.js";import{a as D}from"./apiAdmin-B6-2qm0d.js";import{S as E}from"./SaveOutlined-jkHaLNj1.js";import{P as I}from"./index-BUzTR6QN.js";import{I as M}from"./index-Cu62pBdq.js";import{_ as T,F as B}from"./index-DZxk72Vu.js";import{B as A}from"./useFlexGapSupport-CpBR-RD-.js";import{S as q}from"./index-_ApNSgqk.js";import{M as F}from"./index-fjGxdX_x.js";import{_ as N,a as P}from"./index-Cv7zOydE.js";const X=()=>{const e="employee-work-status?fields=id,xid,name",t="employee-work-status",{t:n}=v(),l={name:""},s=[{title:n("employee_work_status.name"),dataIndex:"name"},{title:n("common.action"),dataIndex:"action"}],m=[{key:"name",value:n("employee_work_status.name")}];return{url:e,addEditUrl:t,initData:l,columns:s,filterableColumns:m}},U=w({props:["data","visible","url","addEditType","pageTitle","successMessage","formData"],components:{PlusOutlined:I,LoadingOutlined:C,SaveOutlined:E},setup(e,{emit:t}){const{addEditRequestAdmin:n,loading:l,rules:s}=D();return{loading:l,rules:s,onClose:()=>{s.value={},t("closed")},onSubmit:()=>{n({url:e.url,data:e.formData,successMessage:e.successMessage,success:r=>{t("addEditSuccess",r.xid)}})},drawerWidth:window.innerWidth<=991?"90%":"45%"}}});function V(e,t,n,l,s,m){const i=M,r=T,p=P,_=N,f=B,g=h("SaveOutlined"),u=A,k=q,y=F;return O(),$(y,{open:e.visible,closable:!1,centered:!0,title:e.pageTitle,onOk:e.onSubmit},{footer:o(()=>[a(k,null,{default:o(()=>[a(u,{key:"submit",type:"primary",loading:e.loading,onClick:e.onSubmit},{icon:o(()=>[a(g)]),default:o(()=>[d(" "+c(e.addEditType=="add"?e.$t("common.create"):e.$t("common.update")),1)]),_:1},8,["loading","onClick"]),a(u,{key:"back",onClick:e.onClose},{default:o(()=>[d(c(e.$t("common.cancel")),1)]),_:1},8,["onClick"])]),_:1})]),default:o(()=>[a(f,{layout:"vertical"},{default:o(()=>[a(_,{gutter:16},{default:o(()=>[a(p,{xs:24,sm:24,md:24,lg:24},{default:o(()=>[a(r,{label:e.$t("employee_work_status.name"),name:"name",help:e.rules.name?e.rules.name.message:null,validateStatus:e.rules.name?"error":null,class:"required"},{default:o(()=>[a(i,{value:e.formData.name,"onUpdate:value":t[0]||(t[0]=b=>e.formData.name=b),placeholder:e.$t("common.placeholder_default_text",[e.$t("employee_work_status.name")])},null,8,["value","placeholder"])]),_:1},8,["label","help","validateStatus"])]),_:1})]),_:1})]),_:1})]),_:1},8,["open","title","onOk"])}const Y=S(U,[["render",V]]);export{Y as A,X as f};
