import{D as t}from"./p-7737f905.js";import{T as s,d as r,S as e}from"./p-9224a4e9.js";import{c as a}from"./p-d27cb594.js";import{U as o}from"./p-a4d551dd.js";class c extends s{static decode(t){const s=Object.assign(Object.create(c.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},d=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 f extends t{static decode(t){const s=Object.assign(Object.create(f.prototype),t);return s.config=c.decode(s.config),s.user=o.decode(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{f as M,d as a,c as b,i as d,n as i}