<!DOCTYPE html>
<html>
<head>
    <title>Modal Cancel</title>
    <link href="{{ asset('css/app.css') }}" rel="stylesheet">
</head>
<body>
    @if ($dirty)
        <button onclick="document.getElementById('modal').style.display='block'">{{ $name }}</button>
        <div id="modal" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; padding: 20px; border: 1px solid #ccc; z-index: 1000;">
            <h3>{{ $title }}</h3>
            <p>{{ $message }}</p>
            <button onclick="document.getElementById('modal').style.display='none'">No</button>
            <a href="{{ route('modal.cancel.confirm', ['path' => $path]) }}" style="margin-left: 10px;">
                <button>Yes</button>
            </a>
        </div>
    @else
        <a href="{{ $path }}">
            <button>{{ $name }}</button>
        </a>
    @endif
</body>
</html>