<?php

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

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

$gigneo_media_fields[] =
	Field::make( 'media_gallery', 'gigneo_pm_gallery', esc_html__( 'Gallery', 'gigneo' ) )
		->set_type( 'image' )
		->set_datastore( new Serialized() );

$gigneo_media_fields[] =
	Field::make( 'media_gallery', 'gigneo_pm_documents', esc_html__( 'Documents', 'gigneo' ) )
		->set_type( 'application/pdf' )
		->set_datastore( new Serialized() );

$gigneo_media_fields[] =
	Field::make( 'file', 'gigneo_pm_video', esc_html__( 'Video', 'gigneo' ) )
		->set_type( 'video' )
		->set_conditional_logic(
			array(
				array(
					'field' => 'gigneo_pm_video_type',
					'value' => 'video',
				),
			)
		);
