<?php

namespace kernel\widgets\IconBtn;

use kernel\Widget;
use kernel\widgets\ActionButtonWidget;

class IconBtnDeleteWidget extends Widget
{
    public static function create(array $data = []): IconBtnDeleteWidget
    {
        return new static($data);
    }

    public function run()
    {
        $url = $this->data['url'];

        return ActionButtonWidget::create([
            'label' => "<i class='fa-regular fa-trash-can'></i>",
            'url' => $url,
            'btn_type' => "danger",
            'title' => "Удалить"
        ])->run();
    }
}