<div class="card">
    <div class="row">
        <div class="form-group col-md-12 dark:text-indigo-300">
            <label class="dark:text-indigo-300" for="first_name">Full Name <sup style="color: red;">*</sup></label>
            <input required @if (auth()->user())
            value="{{auth()->user()->name}}"
            @endif name="first_name" id="first_name"
                class="form-control dark:text-indigo-300 bg-white dark:bg-gray-900 dark:border-indigo-300 @error('first_name') is-invalid @enderror" type="text" />
            @error('first_name')<small class="form-text text-danger">{{$message}}</small>@enderror
        </div>

        <div class="form-group ">
            <input name="country" id="country" value="{{ setting('COUNTRY_SERVE') ?? 'Bangladesh' }}"
                class="form-control @error('country') is-invalid @enderror" type="hidden" />
            @error('country')
            <small class="form-text text-danger">{{$message}}</small>
            @enderror
        </div>
        
        <div class="form-group col-md-12 dark:text-indigo-300">
            <label class="dark:text-indigo-300" for="phone">Phone <sup style="color: red;">*</sup></label>
            <input @if (auth()->user())
            value="{{auth()->user()->phone}}"
            @endif required name="phone" id="phone"
                class="form-control dark:text-indigo-300 bg-white dark:bg-gray-900 dark:border-indigo-300 @error('phone') is-invalid @enderror" type="number" />
            @error('phone')
            <small class="form-text text-danger">{{$message}}</small>
            @enderror
        </div>


        <div class="form-group col-md-12 @if(setting('REQUIRED_EMAIL_ADDRESS_WHILE_CHECKOUT') == 1)block @elseif( setting('EMAIL_VISIBLE_WHILE_CHECKOUT') == 0)d-none hidden @endif" id="email_wrap">
            <label class="dark:text-indigo-300" for="email">Email Address <sup id="email_sup" style="color: red;">@if(setting('REQUIRED_EMAIL_ADDRESS_WHILE_CHECKOUT') == 1)*@endif</sup></label>
            <input name="email" id="email" class="form-control dark:text-indigo-300 bg-white dark:bg-gray-900 dark:border-indigo-300 @error('email') is-invalid @enderror" type="text" @if( setting('REQUIRED_EMAIL_ADDRESS_WHILE_CHECKOUT') == 1 )required @endif />
            @error('email')
                <small class="form-text text-danger">{{$message}}</small>
            @enderror
        </div>
        

        <div class="form-group col-md-12 dark:text-indigo-300">
            <select name="shipping_range" id="shipping_range" class="form-control dark:text-indigo-300 dark:bg-gray-900 dark:border-indigo-300 cursor-pointer">
                @isset($product)
                    @if ($product->shipping_charge != 1)
                        <option value="3">Shipping FREE</option>
                    @elseif (isset($product->dedicated_shipping_charge))
                        <option value="2">Shipping ({{ $product->dedicated_shipping_charge }})</option>
                    @else
                    <option value="0">Outside of {{ setting('shipping_range_inside') }} - {{ setting('CURRENCY_ICON') ?? '৳' }} {{ setting('shipping_charge_out_of_range') }}</option>
                    <option value="1">Inside {{ setting('shipping_range_inside') }} - {{ setting('CURRENCY_ICON') ?? '৳' }} {{ setting('shipping_charge') }}</option>
                    @endif
                @else
                    <option value="0">Outside of {{ setting('shipping_range_inside') }} - {{ setting('CURRENCY_ICON') ?? '৳' }} {{ setting('shipping_charge_out_of_range') }}</option>
                    <option value="1">Inside {{ setting('shipping_range_inside') }} - {{ setting('CURRENCY_ICON') ?? '৳' }} {{ setting('shipping_charge') }}</option>
                @endisset
            </select>
        </div>

        <div class="form-group col-md-12 dark:text-indigo-300">
                <label class="dark:text-indigo-300" for="address">Full Address</label>
                <textarea name="address" id="address" rows="4"
                    class="form-control dark:text-indigo-300 bg-white dark:bg-gray-900 dark:border-indigo-300"></textarea>
                @error('address')
                    <small class="form-text text-danger">{{$message}}</small>
                @enderror
        </div>
    </div>
</div>