<?php
// Create a section.
$filter_options = [
	'open'     => esc_html__( 'Open', 'forumax' ),
	'closed'   => esc_html__( 'Closed', 'forumax' ),
	'hidden'   => esc_html__( 'Hidden', 'forumax' ),
	'no_reply' => esc_html__( 'No Reply', 'forumax' ),
	'solved'   => esc_html__( 'Solved', 'forumax' ),
	'unsolved' => esc_html__( 'Unsolved', 'forumax' ),
	'all'      => esc_html__( 'All Topics', 'forumax' ),
	'trash'    => esc_html__( 'Trash', 'forumax' ),
];

$default_options = [
	'.open-topics'   => esc_html__( 'Open', 'forumax' ),
	'.closed-topics' => esc_html__( 'Closed', 'forumax' ),
	'.hidden-topics' => esc_html__( 'Hidden', 'forumax' ),
	'.no-reply'      => esc_html__( 'No Reply', 'forumax' ),
	'.solved'        => esc_html__( 'Solved', 'forumax' ),
	'.unsolved'      => esc_html__( 'Unsolved', 'forumax' ),
	'all'            => esc_html__( 'All Topics', 'forumax' )
];

$default_filter_options = [ 'open', 'closed', 'hidden', 'no_reply', 'all', 'trash' ];

CSF::createSection(
	$prefix,
	[
		'title'  => esc_html__( 'Forum Builder', 'forumax' ),
		'icon'   => 'dashicons dashicons-dashboard',
		'fields' => [
			[
				'id'         => 'is_bbp_post_types_hidden',
				'type'       => 'switcher',
				'default'    => false,
				'title'      => esc_html__( 'Classic post types', 'forumax' ),
				'subtitle'   => esc_html__( 'Toggle the visibility of the native forum post type menus (Forums, Topics, Replies).', 'forumax' ),
				'desc'       => esc_html__( 'Turn OFF (Hide) to remove them and keep your dashboard clean. Turn ON (Show) to make them visible again.', 'forumax' ),
				'text_on'    => esc_html__( 'Show', 'forumax' ),
				'text_off'   => esc_html__( 'Hide', 'forumax' ),
				'text_width' => 85
			],

			[
				'id'          => 'default_filter',
				'type'        => 'select',
				'title'       => esc_html__( 'Choose Default Filter', 'forumax' ),
				'subtitle'    => esc_html__( 'Set the default topic status filter that appears when you first load the Forum Builder.', 'forumax' ),
				'placeholder' => esc_html__( 'Select an option', 'forumax' ),
				'options'     => $default_options,
				'default'     => '.open-topics',
			],

			[
				'id'       => 'filter_buttons',
				'type'     => 'button_set',
				'title'    => esc_html__( 'Filters to Show on Admin Page', 'forumax' ),
				'subtitle' => esc_html__( 'Select which status filter buttons are visible in the Forum Builder admin header.', 'forumax' ),
				'class'    => 'bbpc-filter-btn-settings',
				'multiple' => true,
				'options'  => $filter_options,
				'default'  => $default_filter_options,
			],
		],
	]
);