<?php

if (! defined('ABSPATH')) {
    exit;
} require_once __DIR__ . '/class-puffergo-base-cpt.php';
class PufferGo_Solution_CPT extends PufferGo_Base_CPT
{
    public const CPT_SLUG = 'puffergo_solution';

    public const TAX_SLUG = 'puffergo_solution_cat';

    protected function get_module_key(): string
    {
        return 'solution';
    }

    protected function get_config(): array
    {
        return ['module_key' => 'solution', 'cpt_slug' => self::CPT_SLUG, 'archive_slug_option' => 'puffergo_solution_slug', 'archive_slug_default' => 'solutions', 'archive_slug_label' => __('Solutions archive base', 'puffergo'), 'menu_icon' => 'dashicons-lightbulb', 'menu_position' => 5, 'supports' => ['title', 'editor', 'thumbnail', 'excerpt'], 'has_archive' => true, 'singular' => __('Solution', 'puffergo'), 'plural' => __('Solutions', 'puffergo'), 'menu_label' => __('Solutions', 'puffergo'), 'tax_slug' => self::TAX_SLUG, 'tax_singular' => __('Solution Category', 'puffergo'), 'tax_plural' => __('Solution Categories', 'puffergo'), 'tax_archive_slug' => 'solution-category', 'tag_slug' => null, ];
    }

    protected function get_meta_fields(): array
    {
        return ['_puffergo_solution_industry' => ['type' => 'string', 'description' => __('Target Industry', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => 'sanitize_text_field', 'auth_callback' => [$this, 'auth_callback'], ], '_puffergo_solution_pain_points' => ['type' => 'string', 'description' => __('Pain Points', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => [$this, 'sanitize_json_field'], 'auth_callback' => [$this, 'auth_callback'], ], '_puffergo_solution_features' => ['type' => 'string', 'description' => __('Key Features', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => [$this, 'sanitize_json_field'], 'auth_callback' => [$this, 'auth_callback'], ], '_puffergo_solution_products' => ['type' => 'string', 'description' => __('Related Product IDs (JSON: [id,...])', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => [$this, 'sanitize_json_field'], 'auth_callback' => [$this, 'auth_callback'], ], ];
    }
}
