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

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
return array(
	'projects_options' => array(
		'title'     => esc_html__( 'Project Details', 'sifency-addons' ),
		'post_type' => 'portfolio',
		'context'   => 'normal',
		'priority'  => 'high',
		'class'     => 'sifency-metabox',
		'fields'    => array(

			// =================================================================
			// Section: General Information
			// =================================================================
			array(
				'section' => 'General',
				'id'      => 'portfolio_client_name',
				'type'    => 'text',
				'title'   => esc_html__( 'Client Name', 'sifency-addons' ),
				'default' => esc_html__( 'John Smith', 'sifency-addons' ),
			),
			array(
				'section' => 'General',
				'id'      => 'portfolio_industry_type',
				'type'    => 'text',
				'title'   => esc_html__( 'Industry', 'sifency-addons' ),
				'desc'    => esc_html__( 'Client industry sector.', 'sifency-addons' ),
			),
			array(
				'section' => 'General',
				'id'      => 'project_location',
				'type'    => 'text',
				'title'   => esc_html__( 'Project Location', 'sifency-addons' ),
				'desc'    => esc_html__( 'Enter your project location.', 'sifency-addons' ),
			),
			array(
				'section' => 'General',
				'id'      => 'project_size',
				'type'    => 'text',
				'title'   => esc_html__( 'Project Size', 'sifency-addons' ),
				'desc'    => esc_html__( 'e.g. Small, Medium, Large Enterprise', 'sifency-addons' ),
			),
			array(
				'section'  => 'General',
				'id'       => 'portfolio_short_description',
				'type'     => 'wp_editor',
				'title'    => esc_html__( 'Description', 'sifency-addons' ),
				'desc'     => esc_html__( 'Brief project overview.', 'sifency-addons' ),
				'settings' => array(
					'textarea_rows' => 5,
					'media_buttons' => false,
				),
			),

			// =================================================================
			// Section: Specifications & Timeline
			// =================================================================
			array(
				'section' => 'Specifications',
				'id'      => 'portfolio_type_of_work',
				'type'    => 'text',
				'title'   => esc_html__( 'Project Type', 'sifency-addons' ),
				'desc'    => esc_html__( 'e.g. Web Design, Branding', 'sifency-addons' ),
			),
			array(
				'section' => 'Specifications',
				'id'      => 'portfolio_completion_date',
				'type'    => 'date',
				'title'   => esc_html__( 'Completion Date', 'sifency-addons' ),
				'desc'    => esc_html__( 'When was this project delivered?', 'sifency-addons' ),
			),
			array(
				'section' => 'Specifications',
				'id'      => 'portfolio_duration',
				'type'    => 'text',
				'title'   => esc_html__( 'Timeline', 'sifency-addons' ),
				'desc'    => esc_html__( 'Project duration (e.g. 3 months).', 'sifency-addons' ),
			),
			array(
				'section' => 'Specifications',
				'id'      => 'portfolio_technologies_list',
				'type'    => 'repeater',
				'title'   => esc_html__( 'Technologies Used', 'sifency-addons' ),
				'desc'    => esc_html__( 'List the technologies or tools used in this project.', 'sifency-addons' ),
				'fields'  => array(
					array(
						'section' => 'Specifications',
						'id'      => 'tech_name',
						'type'    => 'text',
						'title'   => esc_html__( 'Technology Name', 'sifency-addons' ),
					),
				),
			),

			// =================================================================
			// Section: Presentation & Links
			// =================================================================
			array(
				'section' => 'Presentation',
				'id'      => 'portfolio_website',
				'type'    => 'url',
				'title'   => esc_html__( 'Live URL', 'sifency-addons' ),
				'desc'    => esc_html__( 'Link to the live project.', 'sifency-addons' ),
			),
			array(
				'section' => 'Presentation',
				'id'      => 'project_category_show',
				'type'    => 'button_set',
				'title'   => esc_html__( 'Display Project Category', 'sifency-addons' ),
				'desc'    => esc_html__( 'Show or hide the category info for this project.', 'sifency-addons' ),
				'options' => array(
					'enabled'  => esc_html__( 'Show', 'sifency-addons' ),
					'disabled' => esc_html__( 'Hide', 'sifency-addons' ),
				),
				'default' => 'enabled',
			),

			// =================================================================
			// Section: Client Feedback
			// =================================================================
			array(
				'section' => 'Feedback',
				'id'      => 'portfolio_testimonial',
				'type'    => 'textarea',
				'title'   => esc_html__( 'Client Testimonial', 'sifency-addons' ),
				'desc'    => esc_html__( 'Optional quote or feedback from the client.', 'sifency-addons' ),
			),
			array(
				'section' => 'Feedback',
				'id'      => 'portfolio_rating',
				'type'    => 'slider',
				'title'   => esc_html__( 'Client Satisfaction Rating', 'sifency-addons' ),
				'desc'    => esc_html__( 'Rate out of 5 stars.', 'sifency-addons' ),
				'min'     => 0,
				'max'     => 5,
				'step'    => 0.5,
				'default' => 4.5,
			),
		),
	),
);
