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-BYcXwl4U.js";import{P as C}from"./app-Doj30F-n.js";import{i as k,c as y}from"./app-a6cKceqE.js";import{c as x}from"./app-yF7sElvF.js";import{_ as V}from"./app-CQ-vNlMj.js";import{_ as w}from"./app-DY-0PadZ.js";import"./app-CrjU8lgK.js";import{_ as P}from"./app-B6Y8s8wR.js";import{_}from"./app-DmX24te2.js";import"./app-Ceh-tphd.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};
