<?php

namespace App\Traits\Components;

trait WithCategorySelector
{
    public function selectAllCategories(): void
    {
        $this->form->category_ids = array_keys($this->categories);
    }

    public function deselectAllCategories(): void
    {
        $this->form->category_ids = [];
    }
}
