<?php

namespace KupShop\ComponentsBundle\Twig\Components\Section\DescriptionCollapse;

use KupShop\ComponentsBundle\Attributes\Component;
use KupShop\ComponentsBundle\Attributes\Version;
use KupShop\ComponentsBundle\Twig\Components\Section\DescriptionCollapse;
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Attribute\LiveAction;

#[AsLiveComponent(template: '@Components/components/Section/DescriptionCollapse/Inline/Inline.1.html.twig')]
#[Component(1, [
    new Version(1),
])]
class Inline extends DescriptionCollapse
{
    #[LiveAction]
    public function toggleVisibility(): void
    {
        $this->is_open = !$this->is_open;
    }
}
