<?php

namespace Oney\ThreeByFour\Block\Head;

/**
 * Checkout specific widget URL block
 *
 * Loads the widget script without the intermediary loader for the checkout page.
 */
class WidgetCheckout extends WidgetUrl
{
    /**
     * Return checkout widget script URL (widget.min.js) depending on environment.
     */
    public function getOneyWidgetUrl(): string
    {
        if ($this->isProduction()) {
            return 'https://assets.oney.io/build/widget.min.js';
        }

        return 'https://assets-staging.oney.io/build/widget.min.js';
    }
}

