import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{w as a}from"./page_layout.js?v=1753954525509";import{d as s}from"./public.js?v=1753954525509";import{i as l,r as t}from"./tools2.js?v=1753954525509";import{ay as o,aV as i,cG as r,cA as n}from"./naive.js?v=1753954525509";import{k as c,P as p,r as u,e as m,U as _,V as f,Q as d,a2 as v,W as x,X as g,j,a3 as k}from"./vue.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./rules.js?v=1753954525509";const b={class:"p-20px pt-24px pb-8px"},h={class:"w-260px"},w=c({__name:"clear",setup(c,{expose:w}){const{t:y}=p(),B=u(null),W=m({site:[]}),C={site:{trigger:["change"],validator:()=>0!==W.site.length||new Error(y("Waf.Block.index_27"))}},$=u([]),P=()=>{W.site=$.value.map((e=>e.value))},A=()=>{W.site=[]};return(async()=>{const{message:e}=await l();a(e)&&($.value=e.map((e=>({label:e.siteName,value:e.siteName}))))})(),w({onConfirm:async()=>{var e;return await(null==(e=B.value)?void 0:e.validate()),s({title:y("Waf.Block.index_28"),content:y("Waf.Block.index_29"),onConfirm:async()=>{const e=W.site.length===$.value.length;await t({safe_logs:0,site_all:e?1:0,site_logs:W.site})}}),!1}}),(a,s)=>{const l=o,t=i,c=r,p=n,u=e;return _(),f("div",b,[d(u,{ref_key:"formRef",ref:B,model:g(W),rules:C},{default:v((()=>[d(p,{label:a.$t("Waf.Block.index_25"),path:"site"},{default:v((()=>[x("div",h,[d(c,{value:g(W).site,"onUpdate:value":s[0]||(s[0]=e=>g(W).site=e),options:g($),multiple:!0,filterable:!0,"max-tag-count":"responsive",placeholder:a.$t("Waf.Block.index_27")},{header:v((()=>[d(t,{class:"w-full"},{default:v((()=>[d(l,{class:"flex-1",onClick:P},{default:v((()=>[j(k(a.$t("Public.All")),1)])),_:1}),d(l,{class:"flex-1",onClick:A},{default:v((()=>[j(k(a.$t("Public.Btn.Cancel")),1)])),_:1})])),_:1})])),_:1},8,["value","options","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}});export{w as default};
