<?php
/**
 * Metabox definition for the 'career' post type.
 *
 * @package Sifency
 */

if ( ! defined( 'ABSPATH' ) ) {
	die;
}

return [
		'career_single_metabox' => [
			'title'     => esc_html__( 'Job Details', 'sifency-addons' ),
			'post_type' => 'career',
			'context'   => 'normal',
			'priority'  => 'high',
			'class'     => 'sifency-metabox',
			'fields'    => [
				[
					'id'      => 'meta_career_single_type',
					'type'    => 'button_set',
					'title'   => esc_html__( 'Single Page Layout', 'sifency-addons' ),
					'desc'    => esc_html__( 'Choose between the default theme layout or a custom Elementor template.', 'sifency-addons' ),
					'options' => [
						'default' => esc_html__( 'Theme Default', 'sifency-addons' ),
						'custom'  => esc_html__( 'Custom Template', 'sifency-addons' ),
					],
					'default' => 'default',
				],
				// [
				// 	'id'         => 'meta_career_single_style',
				// 	'type'       => 'select',
				// 	'title'      => esc_html__( 'Select Custom Template', 'sifency-addons' ),
				// 	'options'    => Sifency_Plugin_Helper::get_career_single_types(),
				// 	'dependency' => [ 'meta_career_single_type', '==', 'custom' ], // [controller_id, operator, value]
				// ],
				[
					'id'    => 'career_job_title',
					'type'  => 'text',
					'title' => esc_html__( 'Job Title Override', 'sifency-addons' ),
					'desc'  => esc_html__( 'Leave blank to use the default post title.', 'sifency-addons' ),
				],
				[
					'id'      => 'career_job_type',
					'type'    => 'select',
					'title'   => esc_html__( 'Job Type', 'sifency-addons' ),
					'options' => [
						'full_time' => esc_html__( 'Full Time', 'sifency-addons' ),
						'part_time' => esc_html__( 'Part Time', 'sifency-addons' ),
						'contract'  => esc_html__( 'Contract', 'sifency-addons' ),
						'remote'    => esc_html__( 'Remote', 'sifency-addons' ),
						'hybrid'    => esc_html__( 'Hybrid', 'sifency-addons' ),
					],
					'default' => 'full_time',
				],
				[
					'id'         => 'career_location',
					'type'       => 'text',
					'title'      => esc_html__( 'Job Location', 'sifency-addons' ),
					'attributes' => [ 'placeholder' => esc_html__( 'e.g. New York, NY or Remote', 'sifency-addons' ) ],
				],
				[
					'id'    => 'career_salary',
					'type'  => 'text',
					'title' => esc_html__( 'Salary Range', 'sifency-addons' ),
					'desc'  => esc_html__( 'Example: $50,000 - $70,000 or Competitive', 'sifency-addons' ),
				],
				[
					'id'    => 'career_department',
					'type'  => 'text',
					'title' => esc_html__( 'Department / Team', 'sifency-addons' ),
				],
				[
					'id'    => 'career_experience',
					'type'  => 'text',
					'title' => esc_html__( 'Experience Required', 'sifency-addons' ),
					'desc'  => esc_html__( 'Example: 3+ years', 'sifency-addons' ),
				],
				[
					'id'    => 'career_education',
					'type'  => 'text',
					'title' => esc_html__( 'Educational Requirements', 'sifency-addons' ),
					'desc'  => esc_html__( 'Example: Bachelor\'s degree in Computer Science', 'sifency-addons' ),
				],
				[
					'id'    => 'career_deadline',
					'type'  => 'date',
					'title' => esc_html__( 'Application Deadline', 'sifency-addons' ),
				],
				[
					'id'       => 'career_responsibilities',
					'type'     => 'wp_editor',
					'title'    => esc_html__( 'Job Responsibilities', 'sifency-addons' ),
					'settings' => [ 'textarea_rows' => 7 ],
				],
				[
					'id'       => 'career_requirements',
					'type'     => 'wp_editor',
					'title'    => esc_html__( 'Job Requirements / Skills', 'sifency-addons' ),
					'settings' => [ 'textarea_rows' => 7 ],
				],
				[
					'id'       => 'career_benefits',
					'type'     => 'wp_editor',
					'title'    => esc_html__( 'Benefits', 'sifency-addons' ),
					'settings' => [ 'textarea_rows' => 5 ],
				],
				[
					'id'      => 'career_apply_button_text',
					'type'    => 'text',
					'title'   => esc_html__( 'Apply Button Text', 'sifency-addons' ),
					'default' => esc_html__( 'Apply Now', 'sifency-addons' ),
				],
				[
					'id'    => 'career_apply_link',
					'type'  => 'text',
					'title' => esc_html__( 'Application URL or Email', 'sifency-addons' ),
					'desc'  => esc_html__( 'Enter a full URL or a mailto: link (e.g., mailto:email@example.com).', 'sifency-addons' ),
				],
				[
					'id'    => 'career_featured_image',
					'type'  => 'media',
					'title' => esc_html__( 'Career Banner Image', 'sifency-addons' ),
					'desc'  => esc_html__( 'Recommended size: 1200x600px', 'sifency-addons' ),
				],
			],
		],
];