<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <style>
        table {
            border-collapse: collapse;
            width: 100%;
        }
        th, td {
            border: 1px solid #000;
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #4472C4;
            color: white;
            font-weight: bold;
        }
        .required {
            background-color: #FFE6E6;
        }
        .relationship {
            background-color: #E6F3FF;
        }
    </style>
</head>
<body>
    <table>
        <thead>
            <tr>
                @foreach($columns as $column)
                    <th class="{{ $column['required'] ?? false ? 'required' : '' }} {{ ($column['type'] ?? '') === 'relationship' ? 'relationship' : '' }}">
                        {{ $column['label'] }}
                        @if($column['required'] ?? false)
                            *
                        @endif
                    </th>
                @endforeach
            </tr>
        </thead>
        <tbody>
            @if(!empty($exampleData))
                <tr>
                    @foreach($columns as $column)
                        <td>{{ $exampleData[$column['name']] ?? '' }}</td>
                    @endforeach
                </tr>
            @endif
        </tbody>
    </table>
</body>
</html>
