<div>
    @can('language.create')
        <button type="button" class="btn btn-sm btn-primary" data-coreui-toggle="modal" data-coreui-target="#createLanguageVariableModal">
            <span class="cil-plus"></span>
            Yeni
        </button>
    @endcan

    <div class="modal fade" id="createLanguageVariableModal" tabindex="-1" aria-labelledby="createLanguageVariableModalLabel" aria-hidden="true" wire:ignore.self>
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="createLanguageVariableModalLabel">{{ $formTitle }}</h5>
                    <button type="button" class="btn-close" data-coreui-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <form>
                        <div class="mb-3">
                            <label for="key" class="col-form-label">Değişken:</label>
                            <input type="text" class="form-control" id="key" wire:model.defer="key" autocomplete="off">
                            <div>
                                @error('key') <span class="error">{{ $message }}</span> @enderror
                            </div>
                        </div>
                        <div class="mb-3">
                            <label for="value" class="col-form-label">Değer:</label>
                            <textarea class="form-control" id="value" wire:model.defer="value"></textarea>
                            <div>
                                @error('value') <span class="error">{{ $message }}</span> @enderror
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-coreui-dismiss="modal">Kapat</button>
                    @if(!$editing)
                        <button type="button" class="btn btn-primary" wire:click.prevent="save" wire:loading.attr="disabled" wire:target="save">Oluştur</button>
                    @else
                        <button type="button" class="btn btn-primary" wire:click.prevent="update" wire:loading.attr="disabled" wire:target="update">Güncelle</button>
                    @endif
                </div>
            </div>
        </div>
    </div>
</div>