<?php

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

use Carbon_Fields\Field\Field;

$gigneo_pricing_fields[] = Field::make( 'text', 'gigneo_pm_price', esc_html__( 'Price', 'gigneo' ) )
	->set_attribute( 'type', 'number' )
	->set_attribute( 'data-regex', '^[0-9]+$' );
$gigneo_pricing_fields[] =
	Field::make( 'select', 'gigneo_pm_duration_type', esc_html__( 'Duration', 'gigneo' ) )
		->set_classes( 'gn-select2' )
		->set_options(
			gigneo_delivery_time_types()
		);
$gigneo_pricing_fields[] =
	Field::make( 'text', 'gigneo_pm_duration', esc_html__( 'Duration length', 'gigneo' ) )
		->set_attribute( 'type', 'number' )
		->set_attribute( 'data-regex', '^[0-9]+$' )
		->set_default_value( 1 );

$gigneo_pricing_fields[] =
	Field::make( 'select', 'gigneo_pm_type', esc_html__( 'Mode', 'gigneo' ) )
		->set_options(
			array(
				'remote'  => esc_html__( 'Remote', 'gigneo' ),
				'onsite' => esc_html__( 'Onsite', 'gigneo' ),
			)
		)
		->set_classes( 'gn-select2' );
