<?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\GoogleBusinessProfile\Type;

use ZOOlanders\YOOessentials\Source\GraphQL\AbstractObjectType;
use ZOOlanders\YOOessentials\Source\GraphQL\HasSourceInterface;

class GoogleBusinessProfilePostOfferType extends AbstractObjectType implements HasSourceInterface
{
    public const TYPE_NAME = 'GoogleBusinessProfilePostOffer';
    public const TYPE_LABEL = 'Location Post Offer';

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

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

    public function config(): array
    {
        return [
            'metadata' => [
                'type' => true,
                'label' => $this->label(),
            ],
            'fields' => [
                'couponCode' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'Coupon Code',
                    ],
                ],
                'redeemOnlineUrl' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'Redeem Online URL',
                    ],
                ],
                'termsConditions' => [
                    'type' => 'String',
                    'metadata' => [
                        'label' => 'Terms & Conditions',
                        'filters' => ['limit'],
                    ],
                ],
            ],
        ];
    }
}
