<?php
/**
 * Translatable ability labels and descriptions with literal strings for PCP.
 *
 * @package LolaCoreForBricks
 */

declare(strict_types=1);

namespace LolaCoreForBricks\Support;

/**
 * Centralizes Door 3 i18n strings so __() always receives a literal.
 */
final class AbilityI18n
{
    public static function label(string $actionId): string
    {
        return match ($actionId) {
            'get_bricks_overview' => __('Get Bricks Overview', 'lolacore-for-bricks'),
            'rebuild_design_index' => __('Rebuild Design Index', 'lolacore-for-bricks'),
            'get_global_classes' => __('Get Global Classes', 'lolacore-for-bricks'),
            'get_class_usage' => __('Get Class Usage', 'lolacore-for-bricks'),
            'get_global_variables' => __('Get Global Variables', 'lolacore-for-bricks'),
            'get_variable_usage' => __('Get Variable Usage', 'lolacore-for-bricks'),
            'get_theme_styles' => __('Get Theme Styles', 'lolacore-for-bricks'),
            'get_components' => __('Get Components', 'lolacore-for-bricks'),
            'get_component_usage' => __('Get Component Usage', 'lolacore-for-bricks'),
            'get_templates' => __('Get Templates', 'lolacore-for-bricks'),
            'resolve_template_for_page' => __('Resolve Template For Page', 'lolacore-for-bricks'),
            'describe_element_controls' => __('Describe Element Controls', 'lolacore-for-bricks'),
            'get_bricks_operating_guide' => __('Get Bricks Operating Guide', 'lolacore-for-bricks'),
            'find_unused_classes' => __('Find Unused Classes', 'lolacore-for-bricks'),
            'find_duplicate_classes' => __('Find Duplicate Classes', 'lolacore-for-bricks'),
            'find_unused_variables' => __('Find Unused Variables', 'lolacore-for-bricks'),
            'find_orphan_components' => __('Find Orphan Components', 'lolacore-for-bricks'),
            'find_theme_style_conflicts' => __('Find Theme Style Conflicts', 'lolacore-for-bricks'),
            'create_global_class' => __('Create Global Class', 'lolacore-for-bricks'),
            'update_global_class_settings' => __('Update Global Class Settings', 'lolacore-for-bricks'),
            'rename_global_class' => __('Rename Global Class', 'lolacore-for-bricks'),
            'merge_global_classes' => __('Merge Global Classes', 'lolacore-for-bricks'),
            'trash_global_classes' => __('Trash Global Classes', 'lolacore-for-bricks'),
            'restore_global_class' => __('Restore Global Class', 'lolacore-for-bricks'),
            'set_global_variable' => __('Set Global Variable', 'lolacore-for-bricks'),
            'delete_global_variable' => __('Delete Global Variable', 'lolacore-for-bricks'),
            'update_color_palette' => __('Update Color Palette', 'lolacore-for-bricks'),
            'update_theme_style' => __('Update Theme Style', 'lolacore-for-bricks'),
            'set_design_convention' => __('Set Design Convention', 'lolacore-for-bricks'),
            'get_page_structure' => __('Get Page Structure', 'lolacore-for-bricks'),
            'insert_element' => __('Insert Element', 'lolacore-for-bricks'),
            'move_element' => __('Move Element', 'lolacore-for-bricks'),
            'duplicate_element' => __('Duplicate Element', 'lolacore-for-bricks'),
            'delete_element' => __('Delete Element', 'lolacore-for-bricks'),
            'style_element' => __('Style Element', 'lolacore-for-bricks'),
            'apply_classes' => __('Apply Classes', 'lolacore-for-bricks'),
            'remove_classes' => __('Remove Classes', 'lolacore-for-bricks'),
            'update_element_settings' => __('Update Element Settings', 'lolacore-for-bricks'),
            'set_element_content' => __('Set Element Content', 'lolacore-for-bricks'),
            'add_section' => __('Add Section', 'lolacore-for-bricks'),
            'add_container' => __('Add Container', 'lolacore-for-bricks'),
            'add_div' => __('Add Div', 'lolacore-for-bricks'),
            'add_heading' => __('Add Heading', 'lolacore-for-bricks'),
            'add_text' => __('Add Text', 'lolacore-for-bricks'),
            'add_image' => __('Add Image', 'lolacore-for-bricks'),
            'add_button' => __('Add Button', 'lolacore-for-bricks'),
            'create_template' => __('Create Template', 'lolacore-for-bricks'),
            'set_template_content' => __('Set Template Content', 'lolacore-for-bricks'),
            'update_template_conditions' => __('Update Template Conditions', 'lolacore-for-bricks'),
            'duplicate_template' => __('Duplicate Template', 'lolacore-for-bricks'),
            'delete_template' => __('Delete Template', 'lolacore-for-bricks'),
            'create_component_from_element' => __('Create Component From Element', 'lolacore-for-bricks'),
            'update_component_properties' => __('Update Component Properties', 'lolacore-for-bricks'),
            'update_component' => __('Update Component', 'lolacore-for-bricks'),
            'insert_component_instance' => __('Insert Component Instance', 'lolacore-for-bricks'),
            'update_component_instance' => __('Update Component Instance', 'lolacore-for-bricks'),
            'detach_component_instance' => __('Detach Component Instance', 'lolacore-for-bricks'),
            'update_page_settings' => __('Update Page Settings', 'lolacore-for-bricks'),
            'set_element_conditions' => __('Set Element Conditions', 'lolacore-for-bricks'),
            'set_element_interactions' => __('Set Element Interactions', 'lolacore-for-bricks'),
            'list_dynamic_data_tags' => __('List Dynamic Data Tags', 'lolacore-for-bricks'),
            'set_dynamic_content' => __('Set Dynamic Content', 'lolacore-for-bricks'),
            'get_woo_bricks_surface' => __('Get Woo Bricks Surface', 'lolacore-for-bricks'),
            'create_woo_template' => __('Create Woo Template', 'lolacore-for-bricks'),
            'add_product_element' => __('Add Product Element', 'lolacore-for-bricks'),
            'get_product_elements_catalog' => __('Get Product Elements Catalog', 'lolacore-for-bricks'),
            'clone_structure' => __('Clone Structure', 'lolacore-for-bricks'),
            'bulk_update_content' => __('Bulk Update Content', 'lolacore-for-bricks'),
            'bulk_apply_classes' => __('Bulk Apply Classes', 'lolacore-for-bricks'),
            default => $actionId,
        };
    }

    public static function description(string $actionId): string
    {
        return match ($actionId) {
            'get_bricks_overview' => __('Reports Bricks version, CSS loading mode, domain counts, and index coverage.', 'lolacore-for-bricks'),
            'rebuild_design_index' => __('Rebuilds the persisted Bricks design-system index in batches until finished is true.', 'lolacore-for-bricks'),
            'get_global_classes' => __('List Bricks global classes with categories and lock state.', 'lolacore-for-bricks'),
            'get_class_usage' => __('Show where a global class is used, grouped by page.', 'lolacore-for-bricks'),
            'get_global_variables' => __('List Bricks global variables and color palette.', 'lolacore-for-bricks'),
            'get_variable_usage' => __('Show references to a global variable.', 'lolacore-for-bricks'),
            'get_theme_styles' => __('List Bricks theme styles with conditions.', 'lolacore-for-bricks'),
            'get_components' => __('List Bricks components with instance counts.', 'lolacore-for-bricks'),
            'get_component_usage' => __('List instances of a Bricks component.', 'lolacore-for-bricks'),
            'get_templates' => __('List Bricks templates with conditions.', 'lolacore-for-bricks'),
            'resolve_template_for_page' => __('Resolve winning Bricks templates for a page.', 'lolacore-for-bricks'),
            'describe_element_controls' => __('Describe Bricks element control contracts.', 'lolacore-for-bricks'),
            'get_bricks_operating_guide' => __('Return Bricks domain SOP and architect guidance.', 'lolacore-for-bricks'),
            'find_unused_classes' => __('Find global classes with no indexed usage.', 'lolacore-for-bricks'),
            'find_duplicate_classes' => __('Find groups of equivalent global classes.', 'lolacore-for-bricks'),
            'find_unused_variables' => __('Find global variables with no indexed references.', 'lolacore-for-bricks'),
            'find_orphan_components' => __('Find components with zero indexed instances.', 'lolacore-for-bricks'),
            'find_theme_style_conflicts' => __('Find overlapping theme style conditions with example pages.', 'lolacore-for-bricks'),
            'create_global_class' => __('Create a Bricks global class with name, category, and initial settings.', 'lolacore-for-bricks'),
            'update_global_class_settings' => __('Update Bricks global class settings across breakpoints and states.', 'lolacore-for-bricks'),
            'rename_global_class' => __('Rename a Bricks global class. Call with dry_run first to see affected pages and elements.', 'lolacore-for-bricks'),
            'merge_global_classes' => __('Replace one global class with another everywhere and move the source to trash. Call with dry_run first to review impact.', 'lolacore-for-bricks'),
            'trash_global_classes' => __('Move Bricks global classes to the native trash (reversible). Call with dry_run first to review impact.', 'lolacore-for-bricks'),
            'restore_global_class' => __('Restore a Bricks global class from the native trash.', 'lolacore-for-bricks'),
            'set_global_variable' => __('Create or update one or more Bricks global variables in a single batch. Warns when a value duplicates another token.', 'lolacore-for-bricks'),
            'delete_global_variable' => __('Remove a Bricks global variable. Call with dry_run first to see where it is referenced.', 'lolacore-for-bricks'),
            'update_color_palette' => __('Create or update Bricks color palettes and their swatches.', 'lolacore-for-bricks'),
            'update_theme_style' => __('Create or update a Bricks theme style, including settings and conditions.', 'lolacore-for-bricks'),
            'set_design_convention' => __('Save the Bricks naming convention, variable policy, and protected prefixes for this site. Reports how many existing classes already match.', 'lolacore-for-bricks'),
            'get_page_structure' => __('Summarize the Bricks element tree for a page area. Expand one branch when you need detail.', 'lolacore-for-bricks'),
            'insert_element' => __('Insert a Bricks element into a page area. Call with dry_run first to preview placement.', 'lolacore-for-bricks'),
            'move_element' => __('Move a Bricks element to another parent or position. Call with dry_run first to preview the tree.', 'lolacore-for-bricks'),
            'duplicate_element' => __('Duplicate a Bricks element branch with new IDs. Call with dry_run first to preview the copy.', 'lolacore-for-bricks'),
            'delete_element' => __('Remove a Bricks element branch from a page. Call with dry_run first to review what will be removed.', 'lolacore-for-bricks'),
            'style_element' => __('Apply universal Bricks style controls to one element, including breakpoint and state suffixes. Call with dry_run first.', 'lolacore-for-bricks'),
            'apply_classes' => __('Apply Bricks global classes to one or more elements. Call with dry_run first to review impact.', 'lolacore-for-bricks'),
            'remove_classes' => __('Remove Bricks global classes from one or more elements. Call with dry_run first to review impact.', 'lolacore-for-bricks'),
            'update_element_settings' => __('Update element-specific Bricks settings after validating keys. Call with dry_run first.', 'lolacore-for-bricks'),
            'set_element_content' => __('Update text, image, or link content on one or more existing Bricks elements. Call with dry_run first.', 'lolacore-for-bricks'),
            'add_section' => __('Insert a Bricks section with optional content and site classes in one call. Call with dry_run first.', 'lolacore-for-bricks'),
            'add_container' => __('Insert a Bricks container with optional content and site classes in one call. Call with dry_run first.', 'lolacore-for-bricks'),
            'add_div' => __('Insert a Bricks div with optional content and site classes in one call. Call with dry_run first.', 'lolacore-for-bricks'),
            'add_heading' => __('Insert a Bricks heading with its text and site classes already set. Call with dry_run first.', 'lolacore-for-bricks'),
            'add_text' => __('Insert a Bricks text element with its copy and site classes already set. Call with dry_run first.', 'lolacore-for-bricks'),
            'add_image' => __('Insert a Bricks image from the media library. External URLs are rejected. Call with dry_run first.', 'lolacore-for-bricks'),
            'add_button' => __('Insert a Bricks button with its label, link, and site classes already set. Call with dry_run first.', 'lolacore-for-bricks'),
            'create_template' => __('Create a Bricks template with a type such as header, footer, or content. Call with dry_run first.', 'lolacore-for-bricks'),
            'set_template_content' => __('Write the element tree of one area on a Bricks template. Call with dry_run first.', 'lolacore-for-bricks'),
            'update_template_conditions' => __('Set where a Bricks template applies. Always previews page count and examples. Call with dry_run first.', 'lolacore-for-bricks'),
            'duplicate_template' => __('Duplicate a Bricks template and assign new element IDs. Call with dry_run first.', 'lolacore-for-bricks'),
            'delete_template' => __('Move a Bricks template to the WordPress trash (reversible). Call with dry_run first.', 'lolacore-for-bricks'),
            'create_component_from_element' => __('Convert a Bricks element branch into a component and leave an instance in place. Call with dry_run first.', 'lolacore-for-bricks'),
            'update_component_properties' => __('Define or edit Bricks component properties and their types. Always previews instance count. Call with dry_run first.', 'lolacore-for-bricks'),
            'update_component' => __('Edit a Bricks component structure or style. Always previews how many instances change. Call with dry_run first.', 'lolacore-for-bricks'),
            'insert_component_instance' => __('Insert a Bricks component instance with property values. Call with dry_run first.', 'lolacore-for-bricks'),
            'update_component_instance' => __('Change property values on one Bricks component instance. Call with dry_run first.', 'lolacore-for-bricks'),
            'detach_component_instance' => __('Turn a Bricks component instance into regular elements on that page. Call with dry_run first.', 'lolacore-for-bricks'),
            'update_page_settings' => __('Edit Bricks page settings such as SEO, layout, and page CSS. Template conditions stay on the template. Call with dry_run first.', 'lolacore-for-bricks'),
            'set_element_conditions' => __('Set when a Bricks element is shown. Call with dry_run first.', 'lolacore-for-bricks'),
            'set_element_interactions' => __('Set Bricks element interactions. Custom JavaScript is rejected. Call with dry_run first.', 'lolacore-for-bricks'),
            'list_dynamic_data_tags' => __('List Bricks dynamic data tags grouped by provider, including ACF when it is active.', 'lolacore-for-bricks'),
            'set_dynamic_content' => __('Assign a discovered Bricks dynamic data tag to an element setting. Unknown tags are rejected. Call with dry_run first.', 'lolacore-for-bricks'),
            'get_woo_bricks_surface' => __('Show which Bricks shop templates exist, which are missing, and which WooCommerce elements the site already uses.', 'lolacore-for-bricks'),
            'create_woo_template' => __('Create a Bricks shop template for product, archive, cart, checkout, or account, with its conditions already set. Call with dry_run first.', 'lolacore-for-bricks'),
            'add_product_element' => __('Insert a WooCommerce product element such as title, price, or gallery. Call with dry_run first.', 'lolacore-for-bricks'),
            'get_product_elements_catalog' => __('List Bricks WooCommerce elements grouped by shop function so you can pick one without dumping every name.', 'lolacore-for-bricks'),
            'clone_structure' => __('Copy a Bricks element branch onto several pages with new IDs and optional content per page. Call with dry_run first. Twenty pages run in batches until finished is true.', 'lolacore-for-bricks'),
            'bulk_update_content' => __('Update text, images, or links on matching elements across several pages. Call with dry_run first. Large sets run in batches until finished is true.', 'lolacore-for-bricks'),
            'bulk_apply_classes' => __('Add or remove Bricks global classes on matching elements across several pages. Call with dry_run first. Large sets run in batches until finished is true.', 'lolacore-for-bricks'),
            default => '',
        };
    }
}
