import{D as t}from"./p-aa5ffe14.js";import{T as s,d as r,S as e}from"./p-293acc32.js";import{c as a}from"./p-d27cb594.js";import{U as c}from"./p-9c82afa0.js";class o extends s{static decode(t){const s=Object.assign(Object.create(o.prototype),t);return s.fields=r(s.fields),s.space=e.decode(s.space),s}roleNameCapital(){return a(this.roleName)}}const n=t=>"active"===t.status,i=t=>{const s=t.consents||[];return(t.config.agreements||[]).filter((t=>!s.some((s=>s.agreement._id===t._id)))).length>0},f=t=>{if(!t.config.enforceRequiredInfo)return!1;const s=t.config.fields||[];for(let r=0;r<s.length;r++){const e=s[r];if(e.required&&!t[e.id])return!0}return!1};class p extends t{static decode(t){const s=Object.assign(Object.create(p.prototype),t);return s.config=o.decode(s.config),s.user=s.user?c.decode(s.user):s.user,s}requireDataCompletion(){if(!this.config.enforceRequiredInfo)return!1;const t=this.config.fields||[];for(let s=0;s<t.length;s++){const r=t[s];if(r.required&&!this[r.id])return!0}return!1}}export{p as M,f as a,o as b,i as d,n as i}