@extends('dashboard.layout.main')
@section('breadcrumbs')
    <h2 class="content-header-title float-left mb-0">@lang('sidebar.countries')</h2>
    <div class="breadcrumb-wrapper col-12">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{{ route('dashboard.home') }}">@lang('sidebar.dashboard')</a>
            </li>
            <li class="breadcrumb-item"><a href="#">@lang('sidebar.master_data')</a>
            </li>
            <li class="breadcrumb-item"><a href="{{ route('countries.index') }}">@lang('sidebar.countries')</a>
            </li>
            <li class="breadcrumb-item active">@lang('global.create')
            </li>
        </ol>
    </div>
@endsection
@section('content')

    <section id="column-selectors">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-content">
                        <div class="card-body">
                            <form class="form" action="{{ route('countries.store') }}" method="post" >
                                @csrf
                                <div class="form-body">
                                    <div class="row">
                                        <div class="col-md-6 col-6">
                                            <div class="form-group">
                                                <div class="controls">
                                                    <label>@lang('global.ar_name')</label>
                                                    <input type="text" class="form-control" name="ar_name" placeholder="@lang('global.ar_name')" value="{{ old('ar_name') }}" required="" data-validation-required-message="@lang('global.this_filed_required')">
                                                    <div class="help-block"></div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6 col-6">
                                            <div class="form-group">
                                                <div class="controls">
                                                    <label>@lang('global.en_name')</label>
                                                    <input type="text" class="form-control" name="en_name" placeholder="@lang('global.en_name')" value="{{ old('en_name') }}">
                                                    <div class="help-block"></div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6 col-6">
                                            <div class="form-group">
                                                <div class="controls">
                                                    <label>@lang('global.ar_currency')</label>
                                                    <input type="text" class="form-control" name="ar_currency" placeholder="@lang('global.ar_currency')" value="{{ old('ar_currency') }}" required="" data-validation-required-message="@lang('global.this_filed_required')">
                                                    <div class="help-block"></div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6 col-6">
                                            <div class="form-group">
                                                <div class="controls">
                                                    <label>@lang('global.en_currency')</label>
                                                    <input type="text" class="form-control" name="en_currency" placeholder="@lang('global.ar_currency')" value="{{ old('en_currency') }}" required="" data-validation-required-message="@lang('global.this_filed_required')">
                                                    <div class="help-block"></div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6 col-6">
                                            <div class="form-group">
                                                <div class="controls">
                                                    <label>@lang('global.code')</label>
                                                    <input type="text" class="form-control" name="code" placeholder="@lang('global.code')" value="{{ old('phone_code') }}" required="" data-validation-required-message="@lang('global.this_filed_required')">
                                                    <div class="help-block"></div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6 col-6">
                                            <div class="form-group">
                                                <div class="controls">
                                                    <label>@lang('global.active')</label>
                                                    <select class="form-control" name="is_active" required="" data-validation-required-message="@lang('global.this_filed_required')">
                                                        <option value="" {{ is_null(old('is_active')) == 1 ? "selected" : "" }}>@lang('global.select_is_active')</option>
                                                        <option value="1" {{ old('is_active') == 1 ? "selected" : "" }}>@lang('global.active')</option>
                                                        <option value="0" {{ !is_null(old('is_active')) && old('is_active') == 0 ? "selected" : "" }}>@lang('global.not_active')</option>
                                                    </select>
                                                    <div class="help-block"></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-12 text-center">
                                    <button type="submit" class="btn btn-primary mr-1 mb-1 waves-effect waves-light saveBtn">حفظ</button>
                                    <a href="{{ route('countries.index') }}" class="btn btn-outline-warning mr-1 mb-1 waves-effect waves-light">الغاء</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

@endsection
