@extends('layouts.app')
@section('content')
<div class="nxl-container"><div class="nxl-content"><div class="page-header"><h5>Campaign Template Types</h5><p class="text-muted">Manage WhatsApp, Email, SMS, Ads, and other campaign channels.</p></div><div class="main-content"><div class="row g-4"><div class="col-lg-4"><div class="card"><div class="card-header">Add Template Type</div><div class="card-body"><form method="POST" action="{{ route('campaign-template-types.store') }}">@csrf<input name="name" class="form-control mb-3" placeholder="WhatsApp" required><button class="btn btn-primary">Add Type</button></form></div></div></div><div class="col-lg-8"><div class="card"><div class="card-header">Available Types</div><div class="table-responsive"><table class="table align-middle mb-0"><tbody>@forelse($types as $type)<tr><td><form method="POST" action="{{ route('campaign-template-types.update',$type) }}" class="d-flex gap-2">@csrf @method('PUT')<input name="name" value="{{ $type->name }}" class="form-control" required><button class="btn btn-sm btn-outline-primary">Save</button></form></td><td class="text-end"><form method="POST" action="{{ route('campaign-template-types.destroy',$type) }}" onsubmit="return confirm('Delete this type?')">@csrf @method('DELETE')<button class="btn btn-sm btn-outline-danger">Delete</button></form></td></tr>@empty<tr><td class="text-muted">No template types configured.</td></tr>@endforelse</tbody></table></div></div></div></div></div></div></div>
@endsection
