import{o as a,c as f,w as t,a as i,t as h,u as e,b as s,i as p,g as r,f as c,F as m,h as u}from"./app-DA7OTM4Q.js";import{P as C}from"./app-YXi6Hc2l.js";import{i as k,c as y}from"./app-BT68AfZ-.js";import{c as x}from"./app-yF7sElvF.js";import{_ as V}from"./app-DokSVapq.js";import{_ as w}from"./app-BMjG4tWp.js";import"./app-Zes_jb7S.js";import{_ as P}from"./app-j31z0Ghb.js";import{_}from"./app-C6hnOMuv.js";import"./app-BlCBGn5D.js";import"./app-CqkleIqs.js";function $(){const{utils:l}=k(this);this.closePopup=function(){l.closePopup()},this.isCopied=!1,this.copy=function(){x(this.code),this.isCopied=!0,this.$delay(function(){this.isCopied=!1},2500)}}const N=i("p",{class:"comment"},"你可以将此段代码复制并在创建规则集的时候使用。",-1),B=i("i",{class:"pi pi-copy"},null,-1),g=i("i",{class:"pi pi-check"},null,-1),v=i("i",{class:"pi pi-remove"},null,-1),z={__name:"setCodePopup",setup(l){const o=y(new $);return(F,n)=>(a(),f(C,null,{default:t(()=>[i("header",null,"规则集 “"+h(e(o).setName)+"” 代码",1),s(V,{action:"$"},{default:t(()=>[s(w,{rows:"18",class:"w-full",modelValue:e(o).code,"onUpdate:modelValue":n[0]||(n[0]=d=>e(o).code=d)},null,8,["modelValue"]),N,s(P,null,{default:t(()=>[s(_,{onClick:p(e(o).copy,["prevent"])},{default:t(()=>[e(o).isCopied?u("",!0):(a(),r(m,{key:0},[B,c("复制到剪切板")],64)),e(o).isCopied?(a(),r(m,{key:1},[g,c("已复制")],64)):u("",!0)]),_:1},8,["onClick"]),s(_,{onClick:p(e(o).closePopup,["prevent"])},{default:t(()=>[v,c("关闭窗口")]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1}))}};export{z as default};
