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

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

// This file must RETURN an array.
return [
	'team_options_metabox' => [
		'title'     => esc_html__( 'Team Member Details', 'sifency-addons' ),
		'post_type' => 'team',
		'context'   => 'normal',
		'priority'  => 'high',
		'class'     => 'sifency-metabox',
		'fields'    => [
			[
				'id'      => 'meta_team_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_team_single_style',
				'type'       => 'select',
				'title'      => esc_html__( 'Select Custom Template', 'sifency-addons' ),
				'options'    => 'Sifency_Plugin_Helper::get_team_single_types',
				'dependency' => [ 'meta_team_single_type', '==', 'custom' ],
			],
			[
				'id'       => 'member_bio',
				'type'     => 'wp_editor',
				'title'    => esc_html__( 'Biography', 'sifency-addons' ),
				'settings' => [ 'textarea_rows' => 5 ],
			],
			[
				'id'    => 'member_position',
				'type'  => 'text',
				'title' => esc_html__( 'Job Title / Position', 'sifency-addons' ),
			],
			[
				'id'    => 'member_phone',
				'type'  => 'text',
				'title' => esc_html__( 'Phone Number', 'sifency-addons' ),
			],
			[
				'id'    => 'member_email',
				'type'  => 'email',
				'title' => esc_html__( 'Email Address', 'sifency-addons' ),
			],
			[
				'id'    => 'member_website',
				'type'  => 'url',
				'title' => esc_html__( 'Personal Website', 'sifency-addons' ),
			],
			[
				'id'    => 'member_address',
				'type'  => 'text',
				'title' => esc_html__( 'Location', 'sifency-addons' ),
			],
			[
				'id'     => 'member_social_icons',
				'type'   => 'repeater',
				'title'  => esc_html__( 'Social Profiles', 'sifency-addons' ),
				'desc'   => esc_html__( 'Add social media links for this team member.', 'sifency-addons' ),
				'fields' => [
					[
						'id'    => 'member_icon',
						'type'  => 'text',
						'title' => esc_html__( 'Social Icon Class', 'sifency-addons' ),
					],
					[
						'id'    => 'member_social_link',
						'type'  => 'url',
						'title' => esc_html__( 'Profile URL', 'sifency-addons' ),
					],
				],
				'default' => [
					[ 'member_icon' => 'icon-facebook', 'member_social_link' => '#' ],
					[ 'member_icon' => 'icon-instagram', 'member_social_link' => '#' ],
					[ 'member_icon' => 'icon-linkedin', 'member_social_link' => '#' ],
					[ 'member_icon' => 'icon-dribbble', 'member_social_link' => '#' ],
					[ 'member_icon' => 'icon-github-circled', 'member_social_link' => '#' ],
					[ 'member_icon' => 'icon-youtube-play', 'member_social_link' => '#' ],
				],
			],
			[
				'id'     => 'skills_items',
				'type'   => 'repeater',
				'title'  => esc_html__( 'Skills', 'sifency-addons' ),
				'desc'   => esc_html__( 'Showcase the skills and expertise of the member.', 'sifency-addons' ),
				'fields' => [
					[
						'id'    => 'skills_title',
						'type'  => 'text',
						'title' => esc_html__( 'Skill Name', 'sifency-addons' ),
					],
					[
						'id'    => 'skill_percentage',
						'type'  => 'number',
						'title' => esc_html__( 'Skill Percentage (0-100)', 'sifency-addons' ),
					],
				],
			],
			// [
			// 	'id'      => 'team_contactform7',
			// 	'type'    => 'select',
			// 	'title'   => esc_html__( 'Contact Form', 'sifency-addons' ),
			// 	'desc'    => esc_html__( 'Display a contact form on the team member\'s page.', 'sifency-addons' ),
			// 	'options' => 'sifency_get_cf7_forms',
			// 	'default' => 'none',
			// ],
		],
	],
];