import{u as S,_ as C,d as k,e as $,w as o,g as a,i as c,t as u,b as h,a0 as w,o as D}from"./app-CgV11GBz.js";import{a as E}from"./apiAdmin-CiAsr8eb.js";import{I}from"./index-CJx7RGCD.js";import{_ as M,F as O}from"./index-DX5UyTUL.js";import{B as T}from"./useFlexGapSupport-CWWB0EO1.js";import{S as B}from"./index-4wtx7HnJ.js";import{M as A}from"./index-CNlVDwHo.js";import{S as q}from"./SaveOutlined-NNV7kkji.js";import{P as F}from"./index-B7-RTJOc.js";import{_ as N,a as P}from"./index-CyQQxPex.js";const X=()=>{const e="deposit-categories?fields=id,xid,name",t="deposit-categories",{t:n}=S(),l={name:""},s=[{title:n("deposit_category.name"),dataIndex:"name"},{title:n("common.action"),dataIndex:"action"}],i=[{key:"name",value:n("deposit_category.name")}];return{url:e,addEditUrl:t,initData:l,columns:s,filterableColumns:i}},U=k({props:["formData","data","visible","url","addEditType","pageTitle","successMessage"],components:{PlusOutlined:F,LoadingOutlined:w,SaveOutlined:q},setup(e,{emit:t}){const{addEditRequestAdmin:n,loading:l,rules:s}=E();return{loading:l,rules:s,onClose:()=>{s.value={},t("closed")},onSubmit:()=>{n({url:e.url,data:e.formData,successMessage:e.successMessage,success:d=>{t("addEditSuccess",d.xid)}})},drawerWidth:window.innerWidth<=991?"90%":"45%"}}});function V(e,t,n,l,s,i){const m=I,d=M,p=P,_=N,f=O,g=h("SaveOutlined"),r=T,v=B,b=A;return D(),$(b,{open:e.visible,closable:!1,centered:!0,title:e.pageTitle},{footer:o(()=>[a(v,null,{default:o(()=>[a(r,{key:"submit",type:"primary",loading:e.loading,onClick:e.onSubmit},{icon:o(()=>[a(g)]),default:o(()=>[c(" "+u(e.addEditType=="add"?e.$t("common.create"):e.$t("common.update")),1)]),_:1},8,["loading","onClick"]),a(r,{key:"back",onClick:e.onClose},{default:o(()=>[c(u(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(d,{label:e.$t("deposit_category.name"),name:"name",help:e.rules.name?e.rules.name.message:null,validateStatus:e.rules.name?"error":null,class:"required"},{default:o(()=>[a(m,{value:e.formData.name,"onUpdate:value":t[0]||(t[0]=y=>e.formData.name=y),placeholder:e.$t("common.placeholder_default_text",[e.$t("deposit_category.name")])},null,8,["value","placeholder"])]),_:1},8,["label","help","validateStatus"])]),_:1})]),_:1})]),_:1})]),_:1},8,["open","title"])}const Y=C(U,[["render",V]]);export{Y as A,X as f};
