@extends('layouts.master')

@section('breadcrumb')
<div class="col-sm-6">
    <h4 class="page-title">Pengumuman</h4>
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="javascript:void(0);">Dashboard</a></li>
        <li class="breadcrumb-item"><a href="{{ route('announcements.announcement') }}">Pengumuman</a></li>
        <li class="breadcrumb-item active">Edit Pengumuman</li>
    </ol>
</div>
@endsection

@section('content')
<div class="container-fluid">
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title mb-4">Edit Pengumuman</h4>

                    <form action="{{ route('announcements.update', $announcement->id) }}" method="POST">
                        @csrf
                        @method('PUT')

                        <div class="form-group">
                            <label>Judul:</label>
                            <input type="text" name="title" class="form-control" value="{{ $announcement->title }}" required>
                        </div>

                        <div class="form-group">
                            <label>Konten:</label>
                            <textarea name="content" class="form-control" rows="5" required>{{ $announcement->content }}</textarea>
                        </div>

                        <div class="form-group d-flex justify-content-between mt-4">
                            <a href="{{ route('announcements.announcement') }}" class="btn btn-primary">
                                <i class="fas fa-arrow-left mr-1"></i> Kembali
                            </a>
                            <button type="submit" class="btn btn-primary">
                                <i class="fas fa-save mr-1"></i> Update
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
