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

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

// This file returns an array of metabox definitions.
return [
	'services_options' => [
		'title'     => esc_html__( 'Service Settings', 'sifency-addons' ),
		'post_type' => 'service',
		'context'   => 'normal',
		'priority'  => 'high',
		'class'     => 'sifency-metabox',
		'fields'    => [
			[
				'id'      => 'meta_services_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_services_single_style',
				'type'       => 'select',
				'title'      => esc_html__( 'Select Custom Template', 'sifency-addons' ),
				'options'    => 'Sifency_Plugin_Helper::get_services_single_types',
				'dependency' => [ 'meta_services_single_type', '==', 'custom' ],
			],
			[
				'id'    => 'service_icon',
				'type'  => 'text',
				'title' => esc_html__( 'Service Icon Class', 'sifency-addons' ),
				'desc'  => esc_html__( 'Enter the CSS class for the icon (e.g., Font Awesome).', 'sifency-addons' ),
			],
			[
				'id'    => 'service_icon_image',
				'type'  => 'media',
				'title' => esc_html__( 'Service Icon Image', 'sifency-addons' ),
				'desc'  => esc_html__( 'Upload an icon to represent this service.', 'sifency-addons' ),
			],
			[
				'id'     => 'service_features',
				'type'   => 'repeater',
				'title'  => esc_html__( 'Service Features', 'sifency-addons' ),
				'desc'   => esc_html__( 'Add key features or points for this service.', 'sifency-addons' ),
				'fields' => [
					[
						'id'    => 'feature_text',
						'type'  => 'text',
						'title' => esc_html__( 'Feature Description', 'sifency-addons' ),
					],
				],
			],
			[
				'id'    => 'service_file_upload',
				'type'  => 'upload',
				'title' => esc_html__( 'Downloadable Brochure (PDF)', 'sifency-addons' ),
				'desc'  => esc_html__( 'Upload service documentation for users to download.', 'sifency-addons' ),
			],
		],
	],
];