import{_ as k}from"./IconClose-ChC2G6HM.js";import{_ as x}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{r as C,m as g,c as u,h as f,o as n,a as d,b as w,t as $,n as D,al as L,am as S,an as I,g as b,u as B,f as N,C as y,w as T,F as A,i as H,aq as V}from"./index-CipWZKo_.js";const j={key:0},E={key:0,class:"notify-title"},F=["innerHTML"],M={__name:"AlertComponent",props:{show:{type:Boolean,default:!1},notify:{type:Object,default:()=>({})}},emits:["close"],setup(e,{emit:a}){const o=e,c=a,l=C(o.show);g(()=>o.show,r=>{l.value=r});function p(){l.value=!1,c("close")}return(r,i)=>{const m=k;return l.value?(n(),u("div",j,[d("div",{class:D(["notify","notify--"+e.notify.class])},[d("button",{class:"notify-close",onClick:i[0]||(i[0]=_=>p())},[w(m)]),e.notify?.title?(n(),u("div",E,$(e.notify.title),1)):f("",!0),e.notify?.text?(n(),u("p",{key:1,innerHTML:e.notify.text},null,8,F)):f("",!0)],2)])):f("",!0)}}},O=x(M,[["__scopeId","data-v-a04c4439"]]),P=L("clauses",()=>{const e=C();async function a(){if(e.value)return;const o=await S.post(I.clauses);e.value=o.data}return{clausesList:e,fetchClauses:a}}),K={__name:"ClausesKeeper",props:{partition:{type:String}},setup(e){const a=e,o=b(),c=P(),l=B(),p=a.partition||`Header:${o.fullPath}`,r=N(()=>{let t=[];if(!c.clausesList)return t;for(const s of Object.values(c.clausesList))s.Partition===p&&i(s)&&t.push(s);return t});c.fetchClauses();function i(t){return document.cookie.match(RegExp(`(?:^|;\\s*)${_(t)}=([^;]*)`))===null}function m(t){let s=new Date;s.setDate(7+s.getDate()),document.cookie=`${_(t)}=hidden; path=/; expires=${s}`}function _(t){return`clause_${l.userInfo?.ID}_${t?.ID}`}return(t,s)=>{const v=O;return r.value.length>0?(n(),y(V,{key:0,class:"clauses-keeper",name:"list",tag:"div"},{default:T(()=>[(n(!0),u(A,null,H(r.value,h=>(n(),y(v,{class:"clauses-alert",key:h.ID,notify:{text:h?.Text,class:"basic"},show:!0,onClose:R=>m(h)},null,8,["notify","onClose"]))),128))]),_:1})):f("",!0)}}};export{K as _};
