@extends('layouts.app')
@section('content')
<div class="container">
    <div class="row justify-content-center bg-white p-4 rounded shadow-sm">
        <div class="col-md-12">
            @if ($errors->any())
                <div class="alert alert-danger">
                    <ul class="mb-0">
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif
            @if (session('success'))
                <div class="alert alert-success">
                    {{ session('success') }}
                </div>
            @endif
        </div>
        <div class="col-md-12">
        <div class="d-flex justify-content-end mb-3">
            <h2 class="mb-0 align-self-center flex-grow-1 text-start">Membresías</h2>
            <a href="{{ route('admin_fit.membership.create') }}" class="btn btn-success">
                <i class="bi bi-plus-lg"></i>
                Nuevo
            </a>
        </div>
        <table
            id="membershipTable"
            class="table table-striped table-bordered"
        >
            <thead>
                <tr>
                    <th class="text-center">Nombre</th>
                    <th class="text-center">Días por mes</th>
                    <th class="text-center">Precio</th>
                    <th class="text-center">Acciones</th>
                </tr>
            </thead>
            <tbody>
                <!-- Los datos se cargarán via AJAX -->
            </tbody>
        </table>
        </div>
    </div>
</div>
@endsection
