/**
 * Access capability flags from the PHP-localized config.
 * Pro extends these via the sequensy_admin_capabilities filter.
 */
export function useCapabilities() {
  const caps = window.sequensyAPI?.capabilities;
  return {
    versionHistory: caps?.version_history ?? false,
    nestedFilters: caps?.nested_filters ?? false,
    marketplaceCanInstall: caps?.marketplace_can_install ?? false,
    activityLogLimit: caps?.activity_log_limit ?? 50,
    isPro: window.sequensyAPI?.is_pro ?? false,
    licenseActive: window.sequensyAPI?.license?.is_active ?? false,
  };
}
