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

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

return array(
	'team_options_metabox' => array(
		'title'     => esc_html__( 'Team Member Details', 'sifency-addons' ),
		'post_type' => 'team',
		'context'   => 'normal',
		'priority'  => 'high',
		'class'     => 'sifency-metabox',
		'fields'    => array(

			// =================================================================
			// Section: General Information
			// =================================================================
			array(
				'section' => 'General',
				'id'      => 'member_position',
				'type'    => 'text',
				'title'   => esc_html__( 'Job Title / Position', 'sifency-addons' ),
			),
			array(
				'section'  => 'General',
				'id'       => 'member_bio',
				'type'     => 'wp_editor',
				'title'    => esc_html__( 'Biography', 'sifency-addons' ),
				'settings' => array( 'textarea_rows' => 5 ),
			),

			// =================================================================
			// Section: Contact Information
			// =================================================================
			array(
				'section' => 'Contact Info',
				'id'      => 'member_email',
				'type'    => 'email',
				'title'   => esc_html__( 'Email Address', 'sifency-addons' ),
			),
			array(
				'section' => 'Contact Info',
				'id'      => 'member_phone',
				'type'    => 'text',
				'title'   => esc_html__( 'Phone Number', 'sifency-addons' ),
			),
			array(
				'section' => 'Contact Info',
				'id'      => 'member_website',
				'type'    => 'url',
				'title'   => esc_html__( 'Personal Website', 'sifency-addons' ),
			),
			array(
				'section' => 'Contact Info',
				'id'      => 'member_address',
				'type'    => 'text',
				'title'   => esc_html__( 'Location', 'sifency-addons' ),
			),

			// =================================================================
			// Section: Social Media
			// =================================================================
			array(
				'section' => 'Social Media',
				'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'  => array(
					array(
						'section' => 'Social Media',
						'id'      => 'member_icon',
						'type'    => 'text',
						'title'   => esc_html__( 'Social Icon Class', 'sifency-addons' ),
					),
					array(
						'section' => 'Social Media',
						'id'      => 'member_social_link',
						'type'    => 'url',
						'title'   => esc_html__( 'Profile URL', 'sifency-addons' ),
					),
				),
				'default' => array(
					array(
						'member_icon'        => 'icon-facebook',
						'member_social_link' => '',
					),
					array(
						'member_icon'        => 'icon-instagram',
						'member_social_link' => '',
					),
					array(
						'member_icon'        => 'icon-linkedin',
						'member_social_link' => '',
					),
					array(
						'member_icon'        => 'icon-dribbble',
						'member_social_link' => '',
					),
					array(
						'member_icon'        => 'icon-github-circled',
						'member_social_link' => '',
					),
					array(
						'member_icon'        => 'icon-youtube-play',
						'member_social_link' => '',
					),
				),
			),

			// =================================================================
			// Section: Skills
			// =================================================================
			array(
				'section' => 'Skills',
				'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'  => array(
					array(
						'section' => 'Skills',
						'id'      => 'skills_title',
						'type'    => 'text',
						'title'   => esc_html__( 'Skill Name', 'sifency-addons' ),
					),
					array(
						'section' => 'Skills',
						'id'      => 'skill_percentage',
						'type'    => 'number',
						'title'   => esc_html__( 'Skill Percentage (0-100)', 'sifency-addons' ),
					),
				),
			),


		),
	),
);
