@extends ('layouts/template')
@section('content')
    <div class="p-3 mcp-theme-1">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-header py-2 px-1">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <h6 class="font-weight-bold mb-0"><i class="far fa-file-code"></i> Clauses</h6>
                            </div>
                            <div>
                                <a href="{{ route('practice-management.clauses.replaceAllPage') }}" class="btn btn-sm btn-primary text-white"><i class="fas fa-pencil-alt"></i> Replace All</a>
                            </div>
                        </div>
                    </div>
                    <div class="card-body p-0">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="table-responsive">
                                    <table class="table table-sm table-striped p-0 m-0">
                                        <thead class="bg-light">
                                            <tr>
                                                <th class="border-0">Position Index</th>
                                                <th class="border-0">Model</th>
                                                <th class="border-0">Label</th>
                                                <th class="border-0">Question</th>
                                                <th class="border-0">Answer</th>
                                                <th class="border-0">Clause Text</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            @foreach($clauses as $clause)
                                            <tr>
                                                <td>{{ $clause->position_index }}</td>
                                                <td>{{$clause->model}}</td>
                                                <td>{{$clause->label}}</td>
                                                <td>{{$clause->question}}</td>
                                                <td>{{ $clause->answer }}</td>
                                                <td>{{ $clause->clause_text }}</td>
                                            </tr>
                                            @endforeach
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection