<?php
namespace App\Distributor\Actions\Extensions;

use Dcat\Admin\Grid\Tools\AbstractTool;

class DistProductImport extends AbstractTool
{
    protected $style = 'btn btn-primary';

    public function title()
    {
        return '<i class="feather icon-shopping-cart"></i> &nbsp;'.admin_trans('admin.dist_product_import');
    }

    public function html()
    {
        return parent::html().'&nbsp;';
    }

    public function render()
    {
        $prefix = config('admin.route.prefix');
        // 定义你要跳转的 URL
        $url = "/{$prefix}/import-product";

        // 生成按钮的 HTML
        $html = <<<HTML
<a href="{$url}" class="{$this->style}" target="_blank">
    {$this->title()}
</a>
HTML;

        return $html;
    }
}
