<?php
/**
 * Webkul Software.
 *
 * @category  Webkul
 * @package   Webkul_Agorae
 * @author    Webkul
 * @copyright Copyright (c) Webkul Software Private Limited (https://webkul.com)
 * @license   https://store.webkul.com/license.html
 */
namespace Webkul\Agorae\Model\Sliderimages\Source;

use Magento\Framework\Data\OptionSourceInterface;

/**
 * Webkul Agorae Sliderimages Source Status Model
 */
class Status implements OptionSourceInterface
{
    /**
     * @var \Webkul\Agorae\Model\Sliderimages
     */
    protected $agoraeSliderimages;

    /**
     * __construct
     * @param \Webkul\Agorae\Model\Sliderimages $agoraeSliderimages
     */
    public function __construct(\Webkul\Agorae\Model\Sliderimages $agoraeSliderimages)
    {
        $this->agoraeSliderimages = $agoraeSliderimages;
    }

    /**
     * Get options
     *
     * @return array
     */
    public function toOptionArray()
    {
        $availableOptions = $this->agoraeSliderimages->getAvailableStatuses();
        $options = [];
        foreach ($availableOptions as $key => $value) {
            $options[] = [
                'label' => $value,
                'value' => $key,
            ];
        }
        return $options;
    }
}
