@extends('layouts.app')

@section('title', 'Create Dua')

@section('content')
<div class="page-content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-header">
                        <h4 class="card-title">Create Dua</h4>
                    </div>
                    <div class="card-body">
                        <form action="{{ route('duas.store') }}" method="POST" enctype="multipart/form-data">
                            @csrf
                            <div class="mb-3">
                                <label for="title" class="form-label">Title</label>
                                <input type="text" class="form-control" id="title" name="title" required>
                            </div>
                            <div class="mb-3">
                                <label for="title" class="form-label">Dua</label>
                                <textarea class="form-control" id="Dua" name="dua" rows="3" required></textarea>
                            </div>
                            <div class="mb-3">
                                <label for="translation" class="form-label">Translation</label>
                                <textarea class="form-control" id="translation" name="translation" rows="3" required></textarea>
                            </div>
                            <div class="mb-3">
                                <label for="description" class="form-label">Description</label>
                                <textarea class="form-control" id="description" name="description" rows="3"></textarea>
                            </div>
                            <div class="mb-3">
                                <label for="image" class="form-label">Image</label>
                                <input type="file" class="form-control" id="image" name="image">
                            </div>
                            <div class="mb-3">
                                <label for="dua_category_id" class="form-label">Category</label>
                                <select class="form-control" id="dua_category_id" name="dua_category_id" required>
                                    @foreach ($categories as $category)
                                    <option value="{{ $category->id }}">{{ $category->name }}</option>
                                    @endforeach
                                </select>
                            </div>
                            <button type="submit" class="btn btn-primary">Create Dua</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection