@extends('layouts.admin.theme')

@section('content')
    <div class="container text-start pb-5 mb-5">
        @if($errors->any())
            <div class="alert alert-danger mb-4">@foreach($errors->all() as $e)<div>{{ $e }}</div>@endforeach</div>
        @endif
        <div class="row mb-4">
            <div class="col text-start">
                <h3>Contato no Órgão Gestor</h3>
            </div>
            <div class="col text-end d-flex justify-content-end">

                <button type="button" class="btn btn-light bg-mediumGray me-2"
                    onclick="window.location='{{ route('admin.projetosProgramas.index') }}'">
                    <i class="fa fa-list me-1"></i> Início
                </button>
            </div>
        </div>
        @include('admin.projetosProgramas.partials.steps', ['current' => 'contato', 'project' => $project])
        @include('components.projetosProgramas._stickyProjectHeader', ['project' => $project])
        <form method="post" action="{{ route('admin.projetosProgramas.contato.store', $project->id) }}" class="mt-3 text-start">
            @csrf
            <div class="row">
                <div class="col-md-6">
                    <label class="form-label">* Nome</label>
                    <input type="text" name="contato_nome" class="form-control"
                        value="{{ old('contato_nome', $project->contato_nome) }}" required>
                </div>
                <div class="col-md-6">
                    <label class="form-label">* Matrícula</label>
                    <input type="text" name="contato_matricula" class="form-control"
                        value="{{ old('contato_matricula', $project->contato_matricula) }}" required>
                </div>
                <div class="col-md-4 mt-3">
                    <label class="form-label">Ramal</label>
                    <input type="text" name="contato_ramal" class="form-control"
                        value="{{ old('contato_ramal', $project->contato_ramal) }}">
                </div>
                <div class="col-md-4 mt-3">
                    <label class="form-label">Telefone</label>
                    <input type="text" name="contato_telefone" class="form-control"
                        value="{{ old('contato_telefone', $project->contato_telefone) }}">
                </div>
                <div class="col-md-4 mt-3">
                    <label class="form-label">E-mail</label>
                    <input type="email" name="contato_email" class="form-control"
                        value="{{ old('contato_email', $project->contato_email) }}">
                </div>
            </div>
            <div class="text-end mt-4 d-flex gap-3">
                <button type="submit" class="btn btn-green">
                    <i class="fa fa-arrow-right me-1"></i> Salvar e Prosseguir
                </button>
            </div>
        </form>

    </div>
@endsection