<?php

namespace apexl\Io\modules\display\components;

use apexl\Io\modules\component\Collections\ComponentCollection;
use apexl\Io\modules\component\Collections\ComponentPropertyCollection;
use apexl\Io\modules\component\Component\Component;
use apexl\Io\modules\component\Factories\ComponentPropertyFactory;
use Arrayy\Type\StringCollection;

readonly class TheRightSidebar extends Component
{
    public function __construct(
        ComponentPropertyFactory $propertyFactory,
        ComponentPropertyCollection $props,
        ComponentCollection $components,
        StringCollection $classes,
        ?string $componentId = null
    ) {
        parent::__construct($propertyFactory, $props, $components, $classes, $componentId);
        // setColWidth() is part of the io-component 3.1.7 compatibility shim
        // (slated for reversal) and doesn't exist on the strict base — it's
        // just addClass('col-{size}-{cols}') under the hood, so call that
        // directly to keep the same behaviour under both signatures.
        $this->addClass('col-md-4');
        $this->addClass('col-lg-3');
        $this->addClass('col-xl-2');
    }
}
