import{isRealmOrReef as n}from"../../../utils/is-realm-or-reef.js";import{isCatalogEntitiesEnabled as l}from"../../../utils/is-catalog-entities-enabled.js";import{CatalogEntitiesService as r}from"../../catalog-entities/database/catalog-entities-service.js";async function d(t,a){if(!n()||!l())return{total:0};const e=await r.getInstance({baseDbDir:t,databaseType:"local"}),{total:i}=await e.getEntitiesCount("file"),s=g(a);return{total:i+s}}function g(t){return t?.show?Object.entries(t.catalogs??{}).filter(([o,e])=>!e?.hide).length:0}export{d as getBilledCatalogBuildPagesCount};
