<?php
/**
 * GraphQL Object Type - ImageValueProperty
 * An individual property for the 'value' PostImage field property.
 *
 * @package WPGraphQL\GF\Type\WPObject\FormField\FieldValue\ValueProperty
 * @since   0.5.0
 */

declare( strict_types = 1 );

namespace WPGraphQL\GF\Type\WPObject\FormField\FieldValue\ValueProperty;

use WPGraphQL\GF\Type\WPObject\AbstractObject;

/**
 * Class - ImageValueProperty
 */
class ImageFieldValue extends AbstractObject {
	/**
	 * Type registered in WPGraphQL.
	 *
	 * @var string
	 */
	public static string $type = 'ImageFieldValue';

	/**
	 * {@inheritDoc}
	 */
	public static function get_description(): string {
		return __( 'The individual properties for each element of the PostImage value field.', 'wp-graphql-gravity-forms' );
	}

	/**
	 * {@inheritDoc}
	 */
	public static function get_fields(): array {
		return [
			'altText'     => [
				'type'        => 'String',
				'description' => static fn () => __( 'The image alt text.', 'wp-graphql-gravity-forms' ),
			],
			'basePath'    => [
				'type'        => 'String',
				'description' => static fn () => __( 'The path to the parent directory of the file.', 'wp-graphql-gravity-forms' ),
			],
			'baseUrl'     => [
				'type'        => 'String',
				'description' => static fn () => __( 'The base url to the parent directory of the file.', 'wp-graphql-gravity-forms' ),
			],
			'caption'     => [
				'type'        => 'String',
				'description' => static fn () => __( 'The image caption.', 'wp-graphql-gravity-forms' ),
			],
			'description' => [
				'type'        => 'String',
				'description' => static fn () => __( 'The image description.', 'wp-graphql-gravity-forms' ),
			],
			'filename'    => [
				'type'        => 'String',
				'description' => static fn () => __( 'The filename.', 'wp-graphql-gravity-forms' ),
			],
			'title'       => [
				'type'        => 'String',
				'description' => static fn () => __( 'The image title.', 'wp-graphql-gravity-forms' ),
			],
			'url'         => [
				'type'        => 'String',
				'description' => static fn () => __( 'The url to the file.', 'wp-graphql-gravity-forms' ),
			],
		];
	}
}
