@extends('layouts.app')

@section('title', 'Templates de proposta')
@section('page-title', 'Templates')

@section('content')
    <div class="space-y-3">
        @foreach ($templates as $t)
            <article class="rounded-xl border border-slate-200 bg-white p-4 shadow-sm">
                <h2 class="font-medium">{{ $t->name }}</h2>
                <p class="text-xs text-slate-500">{{ $t->purpose->label() }} @if($t->is_default)· padrão @endif</p>
                <div class="mt-3 max-h-40 overflow-auto rounded border border-slate-100 bg-slate-50 p-3 text-xs prose prose-sm max-w-none">
                    {!! $t->body_html !!}
                </div>
            </article>
        @endforeach
    </div>
@endsection
