import{u as I,_ as T}from"./use-confirmation-dialog-9a866ad9.js";import{_ as V}from"./base-button.vue_vue_type_script_setup_true_lang-4041aa1c.js";import{_ as j}from"./icon-trash-a2f124e2.js";import{_ as N}from"./icon-language-56d3f627.js";import{d as A,r as L,D as P,n as S,o as r,h as m,f as e,b as s,w as o,t as f,p as _,a7 as W,c as E,u as a,a as d,W as F,P as U}from"./app-e2c1adb4.js";import{_ as q}from"./flag.vue_vue_type_script_setup_true_lang-9a70fac7.js";import{_ as G}from"./input-checkbox.vue_vue_type_script_setup_true_lang-cbb48805.js";const H={class:"flex h-14 flex-row gap-y-2 no-underline transition-colors duration-100 hover:bg-gray-50"},J={class:"relative flex flex-1 divide-x border-r no-underline"},K={class:"flex max-w-full"},M={class:"mr-0 flex w-14 items-center justify-center"},O={class:"flex shrink-0 items-center"},Q={class:"flex flex-1 justify-between gap-x-4 truncate px-4"},R={class:"flex w-full items-center truncate font-medium"},X={class:"mr-2 max-w-full truncate text-base text-gray-700"},Y={class:"inline-block"},Z={class:"flex h-5 items-center rounded-md border px-1.5 text-xs font-normal leading-none text-gray-600"},ee={class:"hidden flex-1 flex-wrap content-center items-center gap-1 px-4 md:flex md:max-w-72 lg:max-w-80 xl:max-w-96"},te={class:"w-full py-2"},se={class:"translation-progress w-full overflow-hidden rounded-full bg-gray-200"},ne={class:"hidden w-full border-r sm:flex sm:w-14"},oe={class:"flex h-full"},ae={class:"flex w-full max-w-full"},le={class:"flex flex-col p-6"},ie=e("span",{class:"text-xl font-medium text-gray-700"},"Are you sure?",-1),re={class:"mt-2 text-sm text-gray-500"},de={class:"font-medium text-gray-900"},ce={class:"mt-4 flex gap-4"},xe=A({__name:"translation-item",props:{translation:{},selectedIds:{}},setup(x){const l=x,{loading:v,showDialog:w,openDialog:p,performAction:y,closeDialog:b}=I(),k=async t=>{await y(()=>F.delete(route("ltu.translation.delete",t)))},c=L(l.selectedIds.includes(l.translation.id));return P(()=>l.selectedIds,t=>{c.value=t.includes(l.translation.id)}),(t,n)=>{const D=G,C=q,g=U,z=N,$=j,h=V,B=T,u=S("tooltip");return r(),m("div",H,[e("div",J,[e("div",K,[e("div",M,[e("div",O,[s(D,{modelValue:c.value,"onUpdate:modelValue":n[0]||(n[0]=i=>c.value=i),value:t.translation.id},null,8,["modelValue","value"])])])]),s(g,{href:t.route("ltu.phrases.index",t.translation.id),class:"flex w-full divide-x"},{default:o(()=>[e("div",Q,[e("div",R,[s(C,{"country-code":t.translation.language.code,class:"mr-2"},null,8,["country-code"]),e("span",X,f(t.translation.language.name),1),e("div",Y,[e("span",Z,f(t.translation.language.code),1)])])]),e("div",ee,[_((r(),m("div",te,[e("div",se,[e("div",{class:"h-2 bg-green-600",style:W({width:`${t.translation.progress}`})},null,4)])])),[[u,`${t.translation.progress} strings translated`]])])]),_:1},8,["href"])]),e("div",ne,[_((r(),E(g,{href:t.route("ltu.phrases.index",t.translation.id),class:"relative inline-flex h-14 w-full cursor-pointer select-none items-center justify-center px-4 text-sm font-medium tracking-wide text-gray-400 outline-none transition-colors duration-150 ease-out hover:bg-blue-50 hover:text-blue-500 focus:border-blue-50"},{default:o(()=>[s(z,{class:"hidden size-5 sm:flex"})]),_:1},8,["href"])),[[u,"Translate"]])]),e("div",oe,[_((r(),m("div",ae,[e("button",{type:"button",class:"relative inline-flex size-14 cursor-pointer select-none items-center justify-center p-4 text-sm font-medium uppercase tracking-wide text-gray-400 no-underline outline-none transition-colors duration-150 ease-out hover:bg-red-50 hover:text-red-600",onClick:n[1]||(n[1]=(...i)=>a(p)&&a(p)(...i))},[s($,{class:"size-5"})])])),[[u,"Delete"]]),s(B,{size:"sm",show:a(w)},{default:o(()=>[e("div",le,[ie,e("span",re,[d(" This action cannot be undone, This will permanently delete the "),e("span",de,f(t.translation.language.name),1),d(" language and all of its translations. ")]),e("div",ce,[s(h,{variant:"secondary",type:"button",size:"lg","full-width":"",onClick:a(b)},{default:o(()=>[d(" Cancel ")]),_:1},8,["onClick"]),s(h,{variant:"danger",type:"button",size:"lg","is-loading":a(v),"full-width":"",onClick:n[2]||(n[2]=i=>k(t.translation.id))},{default:o(()=>[d(" Delete ")]),_:1},8,["is-loading"])])])]),_:1},8,["show"])])])}}});export{xe as _};
