<x-form @submit.prevent="submit">
    <x-modal>
        <div class="form-group">
            <x-label for="name"  > {{__('Name') }}</x-label>
            <x-input type="text"  name="name"  v-model="fields.name" required />
            <x-error v-if="errors && errors.name">@{{ errors.name[0] }}</x-error>
        </div>
        <div class="row">
            <div class="form-group col-6">
                <x-label for="code"  > {{__('Code') }}</x-label>
                <x-input type="text"  name="code"  v-model="fields.code" required />
                <x-error v-if="errors && errors.code">@{{ errors.code[0] }}</x-error>
            </div>
            <div class="form-group col-6">
                <x-label for="symbol"  > {{__('Symbol') }}</x-label>
                <x-input type="text"  name="symbol"  v-model="fields.symbol" required />
                <x-error v-if="errors && errors.symbol">@{{ errors.symbol[0] }}</x-error>
            </div>
        </div>

        <div class="form-group">
            <x-label for="precision"  > {{__('precision') }}</x-label>
            <x-input type="number"  name="precision"  v-model="fields.precision" required />
            <x-error v-if="errors && errors.precision">@{{ errors.precision[0] }}</x-error>
        </div>
        <div class="row">
            <div class="form-group col-6">
                <x-label for="decimal_mark"  > {{__('Decimal mark') }}</x-label>
                <x-input type="text"  name="decimal_mark"  v-model="fields.decimal_mark" required />
                <x-error v-if="errors && errors.decimal_mark">@{{ errors.decimal_mark[0] }}</x-error>
            </div>
            <div class="form-group col-6">
                <x-label for="thousands_separator"  > {{__('Thousands separator') }}</x-label>
                <x-input type="text"  name="thousands_separator"  v-model="fields.thousands_separator" required />
                <x-error v-if="errors && errors.thousands_separator">@{{ errors.thousands_separator[0] }}</x-error>
            </div>
        </div>
        <div class="form-group">
            <x-label for="exchange_rate"  > {{__('Exchange Rate') }}</x-label>
            <x-input type="text"  name="exchange_rate"  v-model="fields.exchange_rate" required />
            <x-error v-if="errors && errors.exchange_rate">@{{ errors.exchange_rate[0] }}</x-error>
        </div>
        <div class="form-group">
            <div class="custom-control custom-switch">
                <x-input name="status" type="checkbox" id="status" v-model="fields.status" class="custom-control-input" />
                <x-label for="status"  class="custom-control-label" > {{__('Status') }}</x-label>
            </div>
        </div>
        <x-slot name="footer">
            <a @click="save" class="btn btn-success float-left mx-1 float-right link-submit">{{ __('Save') }}</a>
            <button type="submit" class="btn btn-primary float-right link-submit">{{ __('save and continue') }}</button>
        </x-slot>
    </x-modal>
</x-form>