<?php
/**
 * Quote Options
 *
 * @category  Magetop Extensions
 * @package   Magetop_Quotesystem
 * @author    Magetop Developer
 * @copyright Copyright (c) Magetop (https://www.magetop.com)
 * @license   https://www.magetop.com/license.html
 */

namespace Magetop\Quotesystem\Ui\Component\Listing\Column\Quote\Status;

use Magento\Framework\Data\OptionSourceInterface;

class QuoteOptions implements OptionSourceInterface
{
    public const STATUS_UNAPPROVED = 1;
    public const STATUS_APPROVED = 2;
    public const STATUS_DECLINE = 3;
    public const STATUS_SOLD = 4;
    /**
     * Get options
     *
     * @return array
     */
    public function toOptionArray()
    {
        $options[] = ['label' => '', 'value' => ''];
        $availableOptions = $this->getOptionArray();
        foreach ($availableOptions as $key => $value) {
            $options[] = [
                'label' => $value,
                'value' => $key,
            ];
        }
        return $options;
    }

    /**
     * Get option array
     */
    public function getOptionArray()
    {
        return [
            self::STATUS_UNAPPROVED => __('Pending'),
            self::STATUS_APPROVED => __('Approved'),
            self::STATUS_DECLINE => __('Declined'),
            self::STATUS_SOLD => __('Sold')
        ];
    }
}
