@extends('admin.layouts.app')

@section('title', 'Tambah/Edit Kegiatan')

@section('content')
<form action="{{ isset($kegiatan) ? route('admin.kegiatan.update', $kegiatan->id) : route('admin.kegiatan.store') }}" method="POST">
    @csrf
    @if(isset($kegiatan))
        @method('PUT')
    @endif

    <div class="mb-3">
        <label>Judul Kegiatan</label>
        <input type="text" name="judul" class="form-control" value="{{ $kegiatan->judul ?? '' }}">
    </div>

    <div class="mb-3">
        <label>Deskripsi</label>
        <textarea name="deskripsi" class="form-control">{{ $kegiatan->deskripsi ?? '' }}</textarea>
    </div>

    <div class="mb-3">
        <label>Tanggal</label>
        <input type="date" name="tanggal" class="form-control" value="{{ $kegiatan->tanggal ?? '' }}">
    </div>

    <button type="submit" class="btn btn-success">Simpan</button>
</form>
@endsection
