import { bootstrap } from '@/api/client';

/**
 * Whether a feature is here. In the WordPress.org build, that is whether the
 * plugin contains it; in the premium build, whether the site's plan includes it.
 * The server decides and sends the answer with the page.
 */
export function hasFeature(feature: string): boolean {
  return !(bootstrap().lockedFeatures ?? []).includes(feature);
}

/** The AI workflow builder: Build with AI, and Change with AI in the editor. */
export const AI_BUILDER = 'ai_workflow_generator';
