{% extends 'base.html.twig' %}

{% block title %}Application Settings{% endblock %}

{% block body %}
    <div class="container mx-auto p-4">
        <div class="bg-white shadow-lg rounded-sm overflow-hidden">
            <div class="bg-gray-800 text-white p-4">
                <h1 class="text-2xl font-bold">
                    <i class="fas fa-cog mr-2"></i>Application Settings
                </h1>
            </div>
            <div class="p-6">
                {{ form_start(form, {'attr': {'class': 'space-y-6'}}) }}
                <div class="mb-4">
                    {{ form_label(form.mangaDirectory, 'Manga Directory', {'label_attr': {'class': 'block text-sm font-medium text-gray-700 mb-2'}}) }}
                    {{ form_widget(form.mangaDirectory, {'attr': {
                        'class': 'mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm',
                        'placeholder': '/path/to/manga/directory'
                    }}) }}
                    {{ form_errors(form.mangaDirectory) }}
                </div>

                <div class="mb-4">
                    {{ form_label(form.imageDirectory, 'Image Directory', {'label_attr': {'class': 'block text-sm font-medium text-gray-700 mb-2'}}) }}
                    {{ form_widget(form.imageDirectory, {'attr': {
                        'class': 'mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm',
                        'placeholder': '/path/to/image/directory'
                    }}) }}
                    {{ form_errors(form.imageDirectory) }}
                </div>

                <div class="flex items-center justify-between mt-6">
                    <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">
                        Save Settings
                    </button>
                </div>
                {{ form_end(form) }}
            </div>
        </div>

        <div class="mt-8 bg-white shadow-lg rounded-sm overflow-hidden">
            <div class="bg-gray-800 text-white p-4">
                <h2 class="text-xl font-bold">
                    <i class="fas fa-info-circle mr-2"></i>Current Settings
                </h2>
            </div>
            <div class="p-6">
                <dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
                    <div class="sm:col-span-1">
                        <dt class="text-sm font-medium text-gray-500">Manga Directory</dt>
                        <dd class="mt-1 text-sm text-gray-900">{{ form.mangaDirectory.vars.value }}</dd>
                    </div>
                    <div class="sm:col-span-1">
                        <dt class="text-sm font-medium text-gray-500">Image Directory</dt>
                        <dd class="mt-1 text-sm text-gray-900">{{ form.imageDirectory.vars.value }}</dd>
                    </div>
                </dl>
            </div>
        </div>
    </div>
{% endblock %}
