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

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

// This file returns an array of metabox definitions.
return [
	'award_options' => [
		'title'     => esc_html__( 'Award Details', 'sifency-addons' ),
		'post_type' => 'award',
		'context'   => 'normal',
		'priority'  => 'high',
		'class'     => 'sifency-metabox',
		'fields'    => [
			[
				'id'    => 'awarding_body',
				'type'  => 'text',
				'title' => esc_html__( 'Awarding Body / Organization', 'sifency-addons' ),
				'desc'  => esc_html__( 'Enter the name of the organization that gave the award (e.g., The Webby Awards, Awwwards).', 'sifency-addons' ),
			],
			[
				'id'      => 'award_level',
				'type'    => 'select',
				'title'   => esc_html__( 'Award Level / Tier', 'sifency-addons' ),
				'options' => [
					'winner'            => esc_html__( 'Winner', 'sifency-addons' ),
					'finalist'          => esc_html__( 'Finalist', 'sifency-addons' ),
					'gold'              => esc_html__( 'Gold', 'sifency-addons' ),
					'silver'            => esc_html__( 'Silver', 'sifency-addons' ),
					'bronze'            => esc_html__( 'Bronze', 'sifency-addons' ),
					'honorable_mention' => esc_html__( 'Honorable Mention', 'sifency-addons' ),
					'nominee'           => esc_html__( 'Nominee', 'sifency-addons' ),
				],
				'default' => 'winner',
			],
			[
				'id'    => 'project_url',
				'type'  => 'url', // Using 'url' for better validation.
				'title' => esc_html__( 'Project URL', 'sifency-addons' ),
				'desc'  => esc_html__( 'Add a link to the winning project or the official announcement page.', 'sifency-addons' ),
			],
			[
				'id'    => 'date_awarded',
				'type'  => 'date',
				'title' => esc_html__( 'Date Awarded', 'sifency-addons' ),
				'desc'  => esc_html__( 'Select the specific date the award was received.', 'sifency-addons' ),
			],
		],
	],
];