import{_ as h}from"./HtmlContent-DrkJBX3e.js";import{_ as g}from"./IconCloseCircle-ctElXVvc.js";import{M as k,o as r,c as p,a as f,b as w,j as v,u as x,r as $,g as b,F as y,h as D,m as I,i as S}from"./index-Bb2UEb_P.js";import{u as B}from"./clauses-Bhz_DuFa.js";const L={class:"tw-relative tw-bg-sky-150 tw-border tw-border-sky-400 tw-rounded tw-pl-4 tw-pr-8 tw-py-4"},N=k({__name:"AlertComponent",props:{text:{}},emits:["close"],setup(m,{emit:a}){const c=a;function s(){c("close")}return(u,o)=>{const n=g,l=h;return r(),p("div",null,[f("div",L,[f("button",{class:"tw-absolute tw-top-2 tw-right-2 tw-size-6 hover:tw-text-orange-500",onClick:o[0]||(o[0]=_=>s())},[w(n)]),w(l,{content:u.text},null,8,["content"])])])}}}),A={key:0,class:"tw-space-y-4 tw-mb-4"},P={__name:"ClausesKeeper",props:{partition:{type:String,default:null}},setup(m){const a=m,c=v(),s=B(),u=x(),o=$(0),n=b(()=>{if(o.value,!s.clausesList)return[];let e=[];for(const t of Object.values(s.clausesList))!l(t)&&t.Partition===(a.partition||`Header:${c.fullPath}`)&&e.push(t);return e});function l(e){return!!document.cookie.match(RegExp(`(?:^|;\\s*)${d(e)}=([^;]*)`))}function _(e){let t=new Date;t.setDate(7+t.getDate()),document.cookie=`${d(e)}=hidden; path=/; expires=${t}`,o.value++}function d(e){return`clause_${u.userInfo?.ID}_${e?.ID}`}return(e,t)=>{const C=N;return n.value.length>0?(r(),p("div",A,[(r(!0),p(y,null,D(n.value,i=>(r(),I(C,{key:i.ID,text:i.Text,class:"clauses-alert",onClose:H=>_(i)},null,8,["text","onClose"]))),128))])):S("",!0)}}};export{P as _};
