import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1764233927359";import{x as a}from"./page_layout.js?v=1764233927359";import{a as s}from"./public.js?v=1764233927359";import{i as l,r as t}from"./tools2.js?v=1764233927359";import{dR as o,dV as i,aX as r,aC as n}from"./naive.js?v=1764233927359";import{k as p,P as u,r as c,e as m,R as _,V as f,W as d,a3 as v,S as x,U as g,j,a4 as k}from"./vue.js?v=1764233927359";import"./common.js?v=1764233927359";import"./__commonjsHelpers__.js?v=1764233927359";import"./rules.js?v=1764233927359";const b={class:"p-20px pt-24px pb-8px"},h={class:"w-260px"},w=p({__name:"clear",setup(p,{expose:w}){const{t:y}=u(),B=c(null),C=m({site:[]}),W={site:{trigger:["change"],validator:()=>0!==C.site.length||new Error(y("Waf.Block.index_27"))}},$=c([]),P=()=>{C.site=$.value.map(e=>e.value)},R=()=>{C.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=C.site.length===$.value.length;await t({safe_logs:0,site_all:e?1:0,site_logs:C.site})}}),!1}}),(a,s)=>{const l=n,t=r,p=i,u=o,c=e;return f(),_("div",b,[d(c,{ref_key:"formRef",ref:B,model:g(C),rules:W},{default:v(()=>[d(u,{label:a.$t("Waf.Block.index_25"),path:"site"},{default:v(()=>[x("div",h,[d(p,{value:g(C).site,"onUpdate:value":s[0]||(s[0]=e=>g(C).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:R},{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};
