<?php

namespace Booktics\Taxonomy;

use Booktics\Abstracts\Taxonomy;

class Category extends Taxonomy {

    /**
     * Get taxonomy name
     *
     * @return string
     */
    public function get_name() {
        return 'booktics_service_category';
    }

    /**
     * Get taxonomy object type
     *
     * @return string
     */
    public function get_obj_type() {
        return 'post';
    }

    /**
     * Get taxonomy arguments
     *
     * @return array
     */
    public function get_args() {
        $labels = array(
            'name'              => esc_html__( 'Category', 'booktics' ),
            'singular_name'     => esc_html__( 'Category', 'booktics' ),
            'search_items'      => esc_html__( 'Search Category', 'booktics' ),
            'all_items'         => esc_html__( 'All Category', 'booktics' ),
            'parent_item'       => esc_html__( 'Parent Category', 'booktics' ),
            'parent_item_colon' => esc_html__( 'Parent Category:', 'booktics' ),
            'edit_item'         => esc_html__( 'Edit Category', 'booktics' ),
            'update_item'       => esc_html__( 'Update Category', 'booktics' ),
            'add_new_item'      => esc_html__( 'Add New Category', 'booktics' ),
            'new_item_name'     => esc_html__( 'New Category Name', 'booktics' ),
            'menu_name'         => esc_html__( 'Category', 'booktics' ),
        );

        return array(
            'hierarchical'      => true,
            'labels'            => $labels,
            'show_ui'           => true,
            'show_admin_column' => true,
            'public'            => true,
            'show_in_nav_menus' => true,
            'show_in_menu'      => true,
            'query_var'         => true,
            'show_in_rest'      => true,
            'rewrite'           => array( 'slug' => 'booktics_service_category' ),
        );
    }
}
