@extends('admin.layouts.app')

@section('title', 'Шинэ Hero')
@section('page_title', 'Hero баннер нэмэх')

@section('content')

<form action="{{ route('admin.heroes.store') }}" method="POST" enctype="multipart/form-data" class="max-w-3xl bg-white rounded-2xl border border-gray-100 p-6 lg:p-8 space-y-5">
    @csrf

    <div>
        <label class="block text-sm font-semibold mb-1">Гарчгийн 1-р мөр <span class="text-nsma-red">*</span></label>
        <input type="text" name="title_line_1" value="{{ old('title_line_1', 'БРЭНДИЙГ ХӨГЖҮҮЛЖ,') }}" required class="w-full px-4 py-3 border border-gray-200 rounded-lg outline-none">
    </div>
    <div>
        <label class="block text-sm font-semibold mb-1">Гарчгийн 2-р мөр (улаан өнгөтэй) <span class="text-nsma-red">*</span></label>
        <input type="text" name="title_line_2" value="{{ old('title_line_2', 'БИЗНЕСИЙГ ӨСГӨЖ,') }}" required class="w-full px-4 py-3 border border-gray-200 rounded-lg outline-none">
    </div>
    <div>
        <label class="block text-sm font-semibold mb-1">Гарчгийн 3-р мөр <span class="text-nsma-red">*</span></label>
        <input type="text" name="title_line_3" value="{{ old('title_line_3', 'ҮР ДҮН БҮТЭЭНЭ.') }}" required class="w-full px-4 py-3 border border-gray-200 rounded-lg outline-none">
    </div>

    <div>
        <label class="block text-sm font-semibold mb-1">Тайлбар</label>
        <textarea name="description" rows="3" class="w-full px-4 py-3 border border-gray-200 rounded-lg outline-none">{{ old('description') }}</textarea>
    </div>

    <div class="grid md:grid-cols-2 gap-4">
        <div>
            <label class="block text-sm font-semibold mb-1">Товчны текст</label>
            <input type="text" name="button_text" value="{{ old('button_text', 'Үйлчилгээ үзэх') }}" class="w-full px-4 py-3 border border-gray-200 rounded-lg outline-none">
        </div>
        <div>
            <label class="block text-sm font-semibold mb-1">Товчны линк</label>
            <input type="text" name="button_link" value="{{ old('button_link', '/services') }}" class="w-full px-4 py-3 border border-gray-200 rounded-lg outline-none">
        </div>
    </div>

    <div>
        <label class="block text-sm font-semibold mb-1">Видео URL (YouTube)</label>
        <input type="url" name="video_url" value="{{ old('video_url') }}" class="w-full px-4 py-3 border border-gray-200 rounded-lg outline-none">
    </div>

    <div>
        <label class="block text-sm font-semibold mb-1">Хажуугийн зурагнууд (3 ширхэг)</label>
        <input type="file" name="side_images[]" accept="image/*" multiple class="w-full">
    </div>

    <div class="grid md:grid-cols-2 gap-4">
        <div>
            <label class="block text-sm font-semibold mb-1">Эрэмбэ</label>
            <input type="number" name="sort_order" value="0" class="w-full px-4 py-3 border border-gray-200 rounded-lg outline-none">
        </div>
        <label class="flex items-center gap-2 pt-7"><input type="hidden" name="is_active" value="0"><input type="checkbox" name="is_active" value="1" checked class="rounded"> Идэвхтэй</label>
    </div>

    <div class="flex gap-3 pt-4 border-t">
        <button class="bg-nsma-red text-white font-semibold px-6 py-3 rounded-lg">Хадгалах</button>
        <a href="{{ route('admin.heroes.index') }}" class="text-gray-600 self-center">Цуцлах</a>
    </div>
</form>

@endsection
