<?php

namespace Plainwork\Ui\Component\Form;

use Plainwork\Http\Request;
use Plainwork\Ui\Component\Form\AbstractInput;
use Plainwork\Ui\Component\Form\InputInterface;

class ColorPickerInput extends AbstractInput implements InputInterface
{
    private string $value = '#cbe86b';

    public function grab(Request $request)
    {
        $ret = $request->getPostParam($this->getName());

        return $ret;
    }

    public function setValue(string $v): self
    {
        $this->value = $v;

        return $this;
    }

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