<?php
namespace NeurogenesisTheme\Controllers\Admin;

class PageTabs {
    /**
     * Represents the general page tab in the admin panel.
     */
    public static function general() {
        $tabs = [
            'dashboard' => [
                'title'   => __( 'Dashboard', 'thinko' ),
                'section' => 'dashboard',
                'icon'    => 'dashboard',
            ],
        ];
        /**
         * Filter Thinko admin header tabs.
         *
         * Companion plugins (e.g. Neurogenesis Styler) can append tabs such as Import Content.
         *
         * @param array<string, array<string, mixed>> $tabs
         */
        $tabs = apply_filters( 'neurogenesis_theme_page_tabs_general', $tabs );
        // Fallback when the companion plugin is active but the filter did not run.
        if ( ! isset( $tabs['import'] ) && ( defined( 'NEUROGENESIS_PATH' ) || defined( 'NEUROGENESIS_VERSION' ) ) ) {
            $tabs['import'] = [
                'title'   => __( 'Import Content', 'thinko' ),
                'section' => 'import',
                'icon'    => 'import',
            ];
        }
        return $tabs;
    }
}
