<?php

namespace Tests\Feature;

use Illuminate\Support\Facades\Blade;
use Tests\TestCase;

class ButtonComponentTest extends TestCase
{
    public function test_danger_soft_has_persistent_border_and_bg(): void
    {
        $html = Blade::render('<x-btn variant="danger-soft">x</x-btn>');
        $this->assertStringContainsString('border border-offline/25', $html);
        $this->assertStringContainsString('bg-offline/10', $html);
        $this->assertStringContainsString('text-offline', $html);
    }

    public function test_no_borderless_ghost_variants_remain(): void
    {
        // Unknown variants fall back to secondary (bordered) — never borderless.
        $html = Blade::render('<x-btn variant="ghost">x</x-btn>');
        $this->assertStringContainsString('border border-line', $html);
        $this->assertStringContainsString('bg-inset', $html);
    }
}
