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-SC54XQDl.js";import{P as C}from"./app-BGgVpkqZ.js";import{i as k,c as y}from"./app-Ba7ZqSpq.js";import{c as x}from"./app-yF7sElvF.js";import{_ as V}from"./app-DFulsyXy.js";import{_ as w}from"./app-T1ysvErZ.js";import"./app-CNHjdV6U.js";import{_ as P}from"./app-CBN_lwXA.js";import{_}from"./app-BUqHq_rP.js";import"./app-yUrwy8EY.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};
