<?php

namespace Solspace\Freeform\Fields\Properties\OpinionScale;

class Scale implements \Stringable
{
    public function __construct(
        private string $value,
        private string $label,
    ) {}

    public function __toString(): string
    {
        return $this->getLabel();
    }

    public function getLabel(): string
    {
        return $this->label ?: $this->getValue();
    }

    public function getValue(): string
    {
        return $this->value;
    }
}
