import{D as t}from"./p-7737f905.js";import{T as s,d as e,S as r}from"./p-0ff0ee91.js";import{c as o}from"./p-d27cb594.js";import{U as a}from"./p-902ec37a.js";class c extends s{static decode(t){const s=Object.assign(Object.create(c.prototype),t);return s.fields=e(s.fields),s.space=r.decode(s.space),s}roleNameCapital(){return o(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 e=0;e<s.length;e++){const r=s[e];if(r.required&&!t[r.id])return!0}return!1};class p extends t{static decode(t){const s=Object.assign(Object.create(p.prototype),t);return s.config=c.decode(s.config),s.user=s.user?a.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 e=t[s];if(e.required&&!this[e.id])return!0}return!1}}export{p as M,f as a,c as b,i as d,n as i}