<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

use Carbon_Fields\Field\Field;
use Gigneo\Post_Meta\Serialized;

$gigneo_basic_info_fields[] = Field::make( 'text', 'gigneo_pm_first_name', esc_html__( 'First name', 'gigneo' ) );

$gigneo_basic_info_fields[] = Field::make( 'text', 'gigneo_pm_last_name', esc_html__( 'Last name', 'gigneo' ) );

$gigneo_basic_info_fields[] = Field::make( 'text', 'gigneo_pm_tagline', esc_html__( 'Tagline', 'gigneo' ) );

$gigneo_basic_info_fields[] = Field::make( 'date', 'gigneo_pm_dob', esc_html__( 'Date of birth', 'gigneo' ) );

$gigneo_basic_info_fields[] = Field::make( 'select', 'gigneo_pm_gender', esc_html__( 'Gender', 'gigneo' ) )
							->set_options( gigneo_genders() )
							->set_classes( 'gn-select2' );

$gigneo_basic_info_fields[] = Field::make( 'select', 'gigneo_pm_qualification', esc_html__( 'Qualification', 'gigneo' ) )
							->set_options( gigneo_qualifications() )
							->set_classes( 'gn-select2' );

$gigneo_basic_info_fields[] = Field::make( 'select', 'gigneo_pm_visibility', esc_html__( 'Profile visibility', 'gigneo' ) )
							->set_options(
								array(
									'public'  => esc_html__( 'Public', 'gigneo' ),
									'private' => esc_html__( 'Private', 'gigneo' ),
								)
							)
							->set_classes( 'gn-select2' );

$gigneo_basic_info_fields[] = Field::make( 'text', 'gigneo_pm_phone', esc_html__( 'Phone', 'gigneo' ) )
                            ->set_attribute( 'data-regex', '^[0-9_+]+$' );

$gigneo_category_list = gigneo_term_list(
	array(
		'taxonomy' => 'gigneo_facet',
		'parent'   => 0,
	),
	false
);

$gigneo_basic_info_fields[] = Field::make( 'multiselect', 'gigneo_pm_categories', esc_html__( 'Categories', 'gigneo' ) )
							->set_datastore( new Serialized() )
							->set_options( $gigneo_category_list )
							->set_classes( 'gn-pm-field-full' );

$gigneo_skill_list          = gigneo_term_list( array( 'taxonomy' => 'gigneo_skill' ), false );
$gigneo_basic_info_fields[] = Field::make( 'multiselect', 'gigneo_pm_skills', esc_html__( 'Skills', 'gigneo' ) )
							->set_datastore( new Serialized() )
							->set_options( $gigneo_skill_list )
							->set_classes( 'gn-pm-field-full' );
