<?php

namespace Autogedal\Labels\Model;

class LabelView
{
    /** @var string */
    private $code;

    /** @var string */
    private $text;

    /** @var string|null */
    private $cssClass;

    /** @var string|null */
    private $type;

    /** @var string|null */
    private $imagePath;

    /** @var string|null */
    private $inlineStyle;

    /** @var string|null */
    private $textStyle;

    /** @var string|null */
    private $imageWidth;

    /** @var string|null */
    private $imageHeight;

    public function __construct(
        string $code,
        string $text,
        ?string $cssClass = null,
        ?string $type = null,
        ?string $imagePath = null,
        ?string $inlineStyle = null,
        ?string $textStyle = null,
        ?string $imageWidth = null,
        ?string $imageHeight = null
    ) {
        $this->code = $code;
        $this->text = $text;
        $this->cssClass = $cssClass;
        $this->type = $type ?: $code;
        $this->imagePath = $imagePath;
        $this->inlineStyle = $inlineStyle;
        $this->textStyle = $textStyle;
        $this->imageWidth = $imageWidth;
        $this->imageHeight = $imageHeight;
    }

    public function getCode(): string
    {
        return $this->code;
    }

    public function getText(): string
    {
        return $this->text;
    }

    public function getCssClass(): ?string
    {
        return $this->cssClass;
    }

    public function getType(): string
    {
        return $this->type;
    }

    public function getImagePath(): ?string
    {
        return $this->imagePath;
    }

    public function getInlineStyle(): ?string
    {
        return $this->inlineStyle;
    }

    public function getTextStyle(): ?string
    {
        return $this->textStyle;
    }

    public function getImageWidth(): ?string
    {
        return $this->imageWidth;
    }

    public function getImageHeight(): ?string
    {
        return $this->imageHeight;
    }
}

