@php
    $user = auth()->user();
@endphp

<div class="d-inline-flex gap-1">
    @if ($user?->can('translations.update', $translation))
        <x-ui.buttons.secondary :href="route('settings.translations.edit', $translation)" size="sm" icon="fe fe-edit-2">
            {{ __('common.edit') }}
        </x-ui.buttons.secondary>
    @endif

    @if ($user?->can('translations.delete', $translation))
        <form method="POST" action="{{ route('settings.translations.destroy', $translation) }}" class="d-inline"
              onsubmit="return confirm('{{ __('translations.confirm_delete') }}');">
            @csrf
            @method('DELETE')
            <x-ui.buttons.danger type="submit" size="sm" outline icon="fe fe-trash-2">
                {{ __('common.delete') }}
            </x-ui.buttons.danger>
        </form>
    @endif
</div>
