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

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

return array(
	'career_single_metabox' => array(
		'title'     => esc_html__( 'Job Details', 'sifency-addons' ),
		'post_type' => 'career',
		'context'   => 'normal',
		'priority'  => 'high',
		'class'     => 'sifency-metabox',
		'fields'    => array(

			// =================================================================
			// Section: General Information
			// =================================================================
			array(
				'section' => 'General',
				'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' ),
			),
			array(
				'section' => 'General',
				'id'      => 'career_job_type',
				'type'    => 'select',
				'title'   => esc_html__( 'Job Type', 'sifency-addons' ),
				'options' => array(
					'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',
			),
			array(
				'section'    => 'General',
				'id'         => 'career_location',
				'type'       => 'text',
				'title'      => esc_html__( 'Job Location', 'sifency-addons' ),
				'attributes' => array( 'placeholder' => esc_html__( 'e.g. New York, NY or Remote', 'sifency-addons' ) ),
			),
			array(
				'section' => 'General',
				'id'      => 'career_department',
				'type'    => 'text',
				'title'   => esc_html__( 'Department / Team', 'sifency-addons' ),
			),
			array(
				'section' => 'General',
				'id'      => 'career_deadline',
				'type'    => 'date',
				'title'   => esc_html__( 'Application Deadline', 'sifency-addons' ),
			),

			// =================================================================
			// Section: Specific Requirements & Data
			// =================================================================
			array(
				'section' => 'Requirements',
				'id'      => 'career_salary',
				'type'    => 'text',
				'title'   => esc_html__( 'Salary Range', 'sifency-addons' ),
				'desc'    => esc_html__( 'Example: $50,000 - $70,000 or Competitive', 'sifency-addons' ),
			),
			array(
				'section' => 'Requirements',
				'id'      => 'career_experience',
				'type'    => 'text',
				'title'   => esc_html__( 'Experience Required', 'sifency-addons' ),
				'desc'    => esc_html__( 'Example: 3+ years', 'sifency-addons' ),
			),
			array(
				'section' => 'Requirements',
				'id'      => 'career_education',
				'type'    => 'text',
				'title'   => esc_html__( 'Educational Requirements', 'sifency-addons' ),
				'desc'    => esc_html__( 'Example: Bachelor\'s degree in Computer Science', 'sifency-addons' ),
			),

			// =================================================================
			// Section: Detailed Content (Editors)
			// =================================================================
			array(
				'section'  => 'Content',
				'id'       => 'career_responsibilities',
				'type'     => 'wp_editor',
				'title'    => esc_html__( 'Job Responsibilities', 'sifency-addons' ),
				'settings' => array( 'textarea_rows' => 7 ),
			),
			array(
				'section'  => 'Content',
				'id'       => 'career_requirements',
				'type'     => 'wp_editor',
				'title'    => esc_html__( 'Job Requirements / Skills', 'sifency-addons' ),
				'settings' => array( 'textarea_rows' => 7 ),
			),
			array(
				'section'  => 'Content',
				'id'       => 'career_benefits',
				'type'     => 'wp_editor',
				'title'    => esc_html__( 'Benefits', 'sifency-addons' ),
				'settings' => array( 'textarea_rows' => 5 ),
			),

			// =================================================================
			// Section: Application Actions
			// =================================================================
			array(
				'section' => 'Application',
				'id'      => 'career_apply_button_text',
				'type'    => 'text',
				'title'   => esc_html__( 'Apply Button Text', 'sifency-addons' ),
				'default' => esc_html__( 'Apply Now', 'sifency-addons' ),
			),
			array(
				'section' => 'Application',
				'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' ),
			),

			// =================================================================
			// Section: Presentation / Media
			// =================================================================
			array(
				'section' => 'Presentation',
				'id'      => 'career_featured_image',
				'type'    => 'media',
				'title'   => esc_html__( 'Career Banner Image', 'sifency-addons' ),
				'desc'    => esc_html__( 'Recommended size: 1200x600px', 'sifency-addons' ),
			),
		),
	),
);
