<?php
/**
 * @package   Essentials YOOtheme Pro 2.2.16 build 0813.1608
 * @author    ZOOlanders https://www.zoolanders.com
 * @copyright Copyright (C) Joolanders, SL
 * @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
 */

namespace ZOOlanders\YOOessentials\Source\Provider\Vimeo\Type;

use ZOOlanders\YOOessentials\Source\GraphQL\TypeInterface;

class VimeoUserType implements TypeInterface
{
    public const TYPE_NAME = 'VimeoUser';
    public const TYPE_LABEL = 'Vimeo User';

    public const FIELDS = [
        'name',
        'bio',
        'short_bio',
        'gender',
        'link',
        'location',
        'is_expert',
        'verified',
        'resource_key',
    ];

    public function type(): string
    {
        return TypeInterface::TYPE_OBJECT;
    }

    public function name(): string
    {
        return self::TYPE_NAME;
    }

    public function label(): string
    {
        return self::TYPE_LABEL;
    }

    public function config(): array
    {
        return [
            'fields' => [
                'resource_key' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'ID',
                    ],
                ],
                'link' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'URL',
                    ],
                ],
                'name' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'Name',
                    ],
                ],
                'gender' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'Gender',
                    ],
                ],
                'bio' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'Bio',
                        'filters' => ['limit'],
                    ],
                ],
                'short_bio' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'Short Bio',
                        'filters' => ['limit'],
                    ],
                ],
                'location' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'Location',
                    ],
                ],
                'is_expert' => [
                    'type' => 'Boolean',
                    'metadata' => [
                        'label' => 'Is Expert',
                    ],
                ],
            ],

            'metadata' => [
                'type' => true,
                'label' => $this->label(),
            ],
        ];
    }
}
