import{g8 as s,bR as n}from"./app-k0jcl5PQ.js";const g={sort(e){return e!=null&&e.length?e.sort((t,i)=>{const a=t.isSharedLibrary?"shared_library":t.type,r=i.isSharedLibrary?"shared_library":i.type;return a===r?t.name.localeCompare(i.name):a==="custom_library"||a==="shared_library"&&r!=="custom_library"||a==="hosted_library"&&r!=="custom_library"&&r!=="shared_library"?-1:1}):[]},hasTwigOrTigtag(e,t){if(!t)return{hasTwig:!1,hasTigtag:!1};if(!t.isAuthenticated){const r=t.contentRegion===s.UK||t.contentRegion===s.SCOT;return{hasTwig:r,hasTigtag:r}}if(!e)return{hasTwig:!1,hasTigtag:!1};let i=!1,a=!1;for(const r of e)if(r.id.toString()===n.Libraries.TWIG?i=!0:r.id.toString()===n.Libraries.TIGTAG&&(a=!0),i&&a)break;return{hasTwig:i,hasTigtag:a}}};export{g as L};
//# sourceMappingURL=CeW16Gou.chunk.js.map
