@extends('layouts.master')
@section('title', 'Edit Group')

@section('content')
<div class="container mt-4">
    <div class="card-header bg-primary text-white py-3">
        <h5 class="mb-0"><i class="fas fa-chart-line me-2"></i> Edit Group</h5>
    </div>

    <form action="{{ route('groups.update', $group) }}" method="POST">
        @csrf @method('PUT')
        <div class="row mb-3 mt-4">
            <div class="col-md-6">
                <label for="name"><strong>Group Name</strong></label>
                <input type="text" name="name" class="form-control" value="{{ $group->name }}" required>
            </div>

            <div class="col-md-6">
                <label for="description"><strong>Description</strong></label>
                <textarea name="description" class="form-control">{{ $group->description }}</textarea>
            </div>
        </div>

        <button type="submit" class="btn btn-success">Update Group</button>
        <a href="{{ route('groups.index') }}" class="btn btn-secondary">Back</a>
    </form>
</div>
@endsection
