import{h as F,y as N,r as z,p as i,M as s,N as r,a6 as p,l as B,W as f,V as c,k as e,o as g,q as d,m as y,$ as D,a0 as I,a4 as W,a2 as $,an as U,t as n,a7 as m}from"./vue-a39e6937.js";import{f as K}from"./index-ba596ae9.js";import{F as b}from"./index-f0d8af94.js";import{b as v}from"./validate-4ecec794.js";const M={class:"title"},L=F({__name:"popupForm",setup(P){const u=N(),t=U("baTable"),{t:a}=K(),V=z({create_time:[v({name:"date",title:a("industryTag.create_time")})],update_time:[v({name:"date",title:a("industryTag.update_time")})]});return(R,o)=>{const T=n("el-form"),h=n("el-scrollbar"),_=n("el-button"),k=n("el-dialog"),w=m("drag"),C=m("zoom"),x=m("loading"),S=m("blur");return i(),s(k,{class:"ba-operate-dialog","close-on-click-modal":!1,"model-value":["add","edit"].includes(e(t).form.operate),onClose:e(t).toggleForm,width:"50%"},{header:r(()=>[p((i(),B("div",M,[f(c(e(t).form.operate?e(a)(e(t).form.operate):""),1)])),[[w,[".ba-operate-dialog",".el-dialog__header"]],[C,".ba-operate-dialog"]])]),footer:r(()=>[g("div",{style:y("width: calc(100% - "+e(t).form.labelWidth/1.8+"px)")},[d(_,{onClick:o[5]||(o[5]=l=>e(t).toggleForm(""))},{default:r(()=>[f(c(e(a)("Cancel")),1)]),_:1}),p((i(),s(_,{loading:e(t).form.submitLoading,onClick:o[6]||(o[6]=l=>e(t).onSubmit(u.value)),type:"primary"},{default:r(()=>[f(c(e(t).form.operateIds&&e(t).form.operateIds.length>1?e(a)("Save and edit next item"):e(a)("Save")),1)]),_:1},8,["loading"])),[[S]])],4)]),default:r(()=>[p((i(),s(h,{class:"ba-table-form-scrollbar"},{default:r(()=>[g("div",{class:$(["ba-operate-form","ba-"+e(t).form.operate+"-form"]),style:y("width: calc(100% - "+e(t).form.labelWidth/2+"px)")},[e(t).form.loading?W("",!0):(i(),s(T,{key:0,ref_key:"formRef",ref:u,onSubmit:o[3]||(o[3]=D(()=>{},["prevent"])),onKeyup:o[4]||(o[4]=I(l=>e(t).onSubmit(u.value),["enter"])),model:e(t).form.items,"label-position":"right","label-width":e(t).form.labelWidth+"px",rules:V},{default:r(()=>[d(b,{label:e(a)("industryTag.name"),type:"string",modelValue:e(t).form.items.name,"onUpdate:modelValue":o[0]||(o[0]=l=>e(t).form.items.name=l),prop:"name",placeholder:e(a)("Please input field",{field:e(a)("industryTag.name")})},null,8,["label","modelValue","placeholder"]),d(b,{label:e(a)("industryTag.status"),type:"switch",modelValue:e(t).form.items.status,"onUpdate:modelValue":o[1]||(o[1]=l=>e(t).form.items.status=l),prop:"status",data:{content:{0:e(a)("industryTag.status 0"),1:e(a)("industryTag.status 1")}}},null,8,["label","modelValue","data"]),d(b,{label:e(a)("industryTag.admin_id"),type:"remoteSelect",modelValue:e(t).form.items.admin_id,"onUpdate:modelValue":o[2]||(o[2]=l=>e(t).form.items.admin_id=l),prop:"admin_id","input-attr":{pk:"admin.id",field:"username","remote-url":"/admin/auth.Admin/index"},placeholder:e(a)("Please select field",{field:e(a)("industryTag.admin_id")})},null,8,["label","modelValue","input-attr","placeholder"])]),_:1},8,["model","label-width","rules"]))],6)]),_:1})),[[x,e(t).form.loading]])]),_:1},8,["model-value","onClose"])}}});export{L as _};
