<?php
declare(strict_types=1);

namespace PpPhp\Core\Designer\Dashboard;

final class DesignerDashboardQuickAction extends DesignerDashboardWidget
{
    public static function action(string $id, string $label, string $target = '', string $icon = 'bi-lightning', int $span = 3, array $props = []): self
    {
        return new self($id, 'quick_action', $label, array_replace([
            'target' => $target !== '' ? $target : $id,
            'icon' => $icon,
            'variant' => 'primary',
        ], $props), $span);
    }
}
