1import{x as xe,aq as me,e as i,f as A,ax as pe,j as e,ay as P,az as L,i as he}from"./index-BTGmPaZ-.js";import{h as B}from"./dialog-Cd30s-D2.js";import"./use-tab-direction-Cs2FaAAJ.js";import"./hidden-DqBOvJBm.js";import"./use-is-mounted-DWeb88A1.js";function E(o){return o?.id!=null?String(o.id):String(o?.name||"")}function q({src:o,alt:m,featured:k=!1,missingImage:z=!1,className:d="h-40 w-full"}){return e.jsxs("div",{className:`relative shrink-0 overflow-hidden bg-gray-100 ${d}`,children:[k?e.jsxs("div",{className:"absolute left-2 top-2 z-10 inline-flex items-center gap-0.5 rounded-full bg-primary px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-white shadow-sm",children:[e.jsx("span",{className:"material-symbols-outlined text-[12px]",children:"star"}),"Ãne çıkan"]}):null,z?e.jsxs("div",{className:"absolute right-2 top-2 z-10 inline-flex items-center gap-0.5 rounded-full bg-amber-500 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-white shadow-sm",title:"Görsel dosyası sunucuda bulunamıyor",children:[e.jsx("span",{className:"material-symbols-outlined text-[12px]",children:"broken_image"}),"Eksik"]}):null,e.jsx("img",{src:o?he(o):"/placeholder-room.jpeg",alt:m||"",className:"h-full w-full object-cover",onError:N=>{N.target.src.endsWith("/placeholder-room.jpeg")||(N.target.src="/placeholder-room.jpeg")}})]})}function ke(){const o=xe(),{selectedLanguage:m}=me(),[k,z]=i.useState("table"),[d,N]=i.useState(1),[p,X]=i.useState([]),[w,D]=i.useState(!0),[g,$]=i.useState(null),[v,Z]=i.useState(1),[y,ee]=i.useState(""),[b,R]=i.useState(()=>new Set),[x,F]=i.useState(!1),[h,ue]=i.useState({featured:null,type:"",status:""}),[te,O]=i.useState(!1),[u,I]=i.useState(!1),[_,se]=i.useState(0),[K,ae]=i.useState(()=>new Map),W=8,c=String(m||"").trim().toLowerCase(),J=u||!c||c==="tr",re=u?"Odalar Ãevriliyor...":c?c==="tr"?"TR Kaynak Dil":"TR'den Odaları Ãevir":"Dil Seçin",le=c?c==="tr"?"Türkçe kaynak dildir. Oda çevirisi için farklı bir hedef dil seçin.":"Türkçe odaları seçili dile aktarır.":"Ãnce hedef dili seçin.",f=i.useMemo(()=>p.map(E).filter(Boolean),[p]),G=b.size,S=f.length>0&&f.every(t=>b.has(t)),ie=f.some(t=>b.has(t))&&!S,T=i.useCallback(()=>{R(new Set)},[]),U=i.useCallback(t=>{t&&R(a=>{const l=new Set(a);return l.has(t)?l.delete(t):l.add(t),l})},[]),V=i.useCallback(()=>{R(t=>{const a=new Set(t);if(S)for(const l of f)a.delete(l);else for(const l of f)a.add(l);return a})},[S,f]),j=i.useCallback(async()=>{try{D(!0),$(null);const t=m||"tr";console.log("Loading rooms for language:",t);const a={page:d,limit:W,language:t};h.featured!==null&&(a.featured=h.featured?1:0),h.type&&(a.type=h.type),h.status&&(a.status=h.status),console.log("API params:",a);const l=await A.getRooms(a);if(console.log("API response:",l),l.success){let n=l.data||[];n=n.map(s=>{if(s.image&&typeof s.image=="string"?(s.image=s.image.trim()||null,console.log("Room image:",s.id,s.name,s.image)):s.image=null,s.gallery)try{if(typeof s.gallery=="string"){let r=s.gallery;r.startsWith('"')&&r.endsWith('"')&&(r=JSON.parse(r)),typeof r=="string"&&(r=JSON.parse(r||"[]")),s.gallery=Array.isArray(r)?r:[]}else Array.isArray(s.gallery)?s.gallery=s.gallery:s.gallery=[]}catch(r){console.error("Gallery parse error:",r,s.gallery),s.gallery=[]}else s.gallery=[];if(s.tags)try{if(typeof s.tags=="string"){let r=s.tags;r.startsWith('"')&&r.endsWith('"')&&(r=JSON.parse(r)),typeof r=="string"&&(r=JSON.parse(r||"[]")),s.tags=Array.isArray(r)?r:[]}else Array.isArray(s.tags)?s.tags=s.tags:s.tags=[]}catch(r){console.error("Tags parse error:",r,s.tags),s.tags=[]}else s.tags=[];if(s.video)try{if(typeof s.video=="string"){let r=s.video;r.startsWith('"')&&r.endsWith('"')&&(r=JSON.parse(r)),typeof r=="string"&&(r=JSON.parse(r||"{}")),s.video=r&&typeof r=="object"?r:null}}catch(r){console.error("Video parse error:",r,s.video),s.video=null}else s.video=null;return s}),y&&(n=n.filter(s=>s.name?.toLowerCase().includes(y.toLowerCase())||s.type?.toLowerCase().includes(y.toLowerCase())||s.subtitle?.toLowerCase().includes(y.toLowerCase()))),X(n),Z(l.pagination?.pages||1)}else $(l.message||"Odalar yüklenirken hata oluÅtu")}catch(t){$(t.message||"Odalar yüklenirken hata oluÅtu"),console.error("Load rooms error:",t)}finally{D(!1)}},[d,h,m,y,W]);i.useEffect(()=>{m&&N(1)},[m]),i.useEffect(()=>{j()},[j]),i.useEffect(()=>{let t=!1;return(async()=>{try{const a=await pe.getMissingFiles();if(t||!a?.success)return;const l=a.data?.missing||[],n=new Map;for(const s of l){const r=s?.context?.room_id;if(r==null)continue;const C=String(r);n.has(C)||n.set(C,[]),n.get(C).push(s)}se(l.length),ae(n)}catch(a){console.warn("Missing media scan failed:",a)}})(),()=>{t=!0}},[]),i.useEffect(()=>{T()},[d,m,h,T]);const M=t=>{N(Math.min(Math.max(t,1),v))},ne=t=>{ee(t.target.value)},Y=async t=>{if(confirm("Bu odayı silmek istediÄinizden emin misiniz?"))try{const a=await A.deleteRoom(t);
1a.success?(R(l=>{const n=new Set(l);return n.delete(String(t)),n}),j()):alert(a.message||"Oda silinirken hata oluÅtu")}catch(a){alert(a.message||"Oda silinirken hata oluÅtu")}},de=async()=>{const t=Array.from(b);if(t.length===0||!confirm(`${t.length} oda silinsin mi? Bu iÅlem geri alınamaz.`))return;F(!0);let a=0,l=0;try{for(const n of t)try{(await A.deleteRoom(n)).success?a+=1:l+=1}catch{l+=1}a>0?(L.success(l>0?`${a} oda silindi, ${l} baÅarısız`:`${a} oda silindi`),T(),await j()):L.error("Odalar silinemedi")}finally{F(!1)}},H=t=>Number(t??0).toLocaleString("tr-TR",{maximumFractionDigits:0}),oe=async()=>{if(!J)try{I(!0);const t=await A.translateRooms({sourceLanguage:"tr",targetLanguage:c,overwrite:!0});if(!t?.success)throw new Error(t?.message||"Odalar çevrilemedi.");await j(),O(!1);const a=t?.data||{},l=[typeof a.created=="number"?`${a.created} yeni`:null,typeof a.updated=="number"?`${a.updated} güncellendi`:null,typeof a.skipped=="number"&&a.skipped>0?`${a.skipped} atlandı`:null].filter(Boolean).join(", ");L.success(l?`${c.toUpperCase()} odaları hazır: ${l}.`:`${c.toUpperCase()} odaları Türkçe kaynaktan güncellendi.`)}catch(t){O(!1),L.error(t?.message||"Oda çevirisi sırasında hata oluÅtu.")}finally{I(!1)}},Q=()=>{u||O(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mx-auto max-w-[1600px] space-y-8 pb-10 text-text-dark",children:[e.jsxs("header",{className:"flex flex-col gap-6 sm:flex-row sm:items-end sm:justify-between",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-text-light",children:"Operasyon"}),e.jsx("h1",{className:"text-3xl font-black tracking-tight text-text-dark sm:text-4xl",children:"Oda Yönetimi"}),e.jsx("p",{className:"max-w-xl text-[15px] leading-relaxed text-text-light",children:"Odaları listeleyin, arayın; fiyat ve içerik güncellemeleri için düzenleyin veya yeni oda ekleyin."})]}),e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("button",{type:"button",title:le,className:"inline-flex shrink-0 items-center justify-center gap-2 rounded-2xl border border-primary/20 px-5 py-3.5 text-sm font-bold text-primary transition hover:bg-primary/5 disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>O(!0),disabled:J,children:[e.jsx("span",{className:"material-symbols-outlined text-[22px]",children:"translate"}),re]}),e.jsxs("button",{type:"button",className:"inline-flex shrink-0 items-center justify-center gap-2 rounded-2xl bg-primary px-5 py-3.5 text-sm font-bold text-white shadow-sm shadow-primary/25 transition hover:bg-primary-dark focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",onClick:()=>o(P({name:"addRoom"})),children:[e.jsx("span",{className:"material-symbols-outlined text-[22px]",children:"add"}),"Yeni Oda Ekle"]})]})]}),_>0?e.jsxs("div",{className:"rounded-2xl border border-amber-200 bg-amber-50 px-5 py-4 text-sm text-amber-950",children:[e.jsxs("p",{className:"font-semibold",children:[_," görsel dosyası veritabanında kayıtlı ama sunucuda bulunamıyor."]}),e.jsxs("p",{className:"mt-1 text-amber-900/90",children:["Yerel veya yedekten"," ",e.jsx("code",{className:"rounded bg-amber-100 px-1.5 py-0.5 text-xs",children:"hotelServer/uploads/"})," ","klasörünü test sunucusuna yükleyin veya eksik odalarda görseli medya kütüphanesinden yeniden seçin. Sayfa yeniledikçe farklı odalar görünür â hepsi aynı sorun (eksik dosya)."]})]}):null,e.jsxs("section",{className:"overflow-hidden rounded-3xl border border-gray-200/80 bg-white shadow-sm",children:[e.jsxs("div",{className:"border-b border-gray-100 bg-gray-50/60 px-5 py-5 sm:px-6 sm:py-6",children:[e.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between",children:[e.jsxs("div",{className:"w-full max-w-md
1space-y-2",children:[e.jsx("label",{htmlFor:"room-search",className:"text-xs font-semibold text-text-dark",children:"Ara"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"material-symbols-outlined pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-[22px] text-text-light",children:"search"}),e.jsx("input",{id:"room-search",type:"search",value:y,onChange:ne,placeholder:"Oda adı, alt baÅlık veya tipâ¦",className:"h-12 w-full rounded-2xl border border-gray-200 bg-white pl-11 pr-4 text-sm text-text-dark placeholder:text-text-light/70 shadow-sm transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-3",children:[e.jsx("span",{className:"text-xs font-semibold text-text-dark sm:mr-1",children:"Görünüm"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"inline-flex h-11 items-center gap-2 rounded-xl border border-gray-200 bg-white px-4 text-sm font-medium text-text-light shadow-sm transition hover:border-primary/40 hover:text-primary",children:[e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"tune"}),"Filtrele"]}),e.jsxs("div",{className:"flex rounded-2xl border border-gray-200 bg-white p-1 shadow-sm",children:[e.jsxs("button",{type:"button",className:`inline-flex h-9 items-center gap-1.5 rounded-xl px-3 text-sm font-semibold transition ${k==="table"?"bg-primary text-white shadow-sm":"text-text-light hover:text-primary"}`,onClick:()=>z("table"),children:[e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"table_rows"}),e.jsx("span",{className:"hidden sm:inline",children:"Tablo"})]}),e.jsxs("button",{type:"button",className:`inline-flex h-9 items-center gap-1.5 rounded-xl px-3 text-sm font-semibold transition ${k==="grid"?"bg-primary text-white shadow-sm":"text-text-light hover:text-primary"}`,onClick:()=>z("grid"),children:[e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"grid_view"}),e.jsx("span",{className:"hidden sm:inline",children:"Kart"})]})]})]})]})]}),!w&&!g&&p.length>0?e.jsx("button",{type:"button",onClick:V,disabled:x,className:"mt-3 text-xs font-semibold text-primary hover:underline disabled:opacity-50",children:S?"Sayfadaki seçimi kaldır":"Sayfadakilerin tümünü seç"}):null,!w&&!g&&G>0?e.jsxs("div",{className:"mt-4 flex flex-col gap-3 rounded-2xl border border-primary/20 bg-primary/5 px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("p",{className:"text-sm font-semibold text-text-dark",children:[e.jsx("span",{className:"text-primary",children:G})," oda seçildi"]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:de,disabled:x,className:"inline-flex items-center gap-1.5 rounded-xl border border-red-200 bg-white px-3 py-2 text-sm font-semibold text-red-600 shadow-sm transition hover:bg-red-50 disabled:opacity-50",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),"Seçilenleri sil"]}),e.jsx("button",{type:"button",onClick:T,disabled:x,className:"rounded-xl px-3 py-2 text-sm font-semibold text-text-light hover:text-text-dark disabled:opacity-50",children:"Seçimi temizle"})]})]}):null,!w&&!g&&e.jsxs("p",{className:"mt-4 text-sm text-text-light",children:[e.jsx("span",{className:"font-medium text-text-dark",children:p.length})," oda bu sayfada",e.jsx("span",{className:"mx-2 text-gray-300",children:"·"}),"Sayfa ",e.jsx("span",{className:"font-medium text-text-dark",children:d})," / ",v]})]}),e.jsx("div",{className:"px-5 py-6 sm:px-6 sm:py-8",children:w?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-text-light",children:[e.jsx("div",{className:"flex size-14 items-center justify-center rounded-2xl bg-primary/10",children:e.jsx("span",{className:"material-symbols-outlined animate-spin text-3xl text-primary",children:"progress_activity"})}),e.jsx("p",{className:"mt-5 text-sm font-medium text-text-dark",children:"Odalar yükleniyor"}),e.jsx("p",{className:"mt-1 text-sm text-text-light",children:"Lütfen bekleyinâ¦"})]}):g?e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-2xl border border-red-100 bg-red-50/50 py-14 px-4 text-center",children:[e.jsx("span",{className:"material-symbols-outlined text-4xl text-red-400",children:"error"}),e.jsx("p",{className:"mt-4 max-w-md text-sm font-medium text-red-800",children:g}),e.jsx("button",{type:"button",onClick:j,className:"mt-6 rounded-xl bg-primary px-5 py-2.5 text-sm font-bold text-white hover:bg-primary-dark",children:"Tekrar dene"})]}):p.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-2xl border border-dashed border-gray-200 bg-gray-50/50 py-16 text-center",children:[e.jsx("span",{className:"material-symbols-outlined text-5xl text-gray-300",children:"hotel"}),e.jsx("p",{className:"mt-4 text-base font-semibold text-text-dark",children:"Kayıt bulunamadı"}),e.jsx("p",{className:"mt-1 max-w-sm text-sm text-text-light",children:"Arama veya filtreleri deÄiÅtirin ya da yeni bir oda ekleyin."})]}):k==="grid"?e.jsx("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4",children:p.map(t=>{const a=Array.isArray(t.tags)?t.tags:[],l=[t.type,`${t.capacity||2}
1 kiÅi`].filter(Boolean).join(" · "),n=E(t),s=b.has(n),r=K.has(String(t.id));return e.jsxs("article",{className:`group flex flex-col overflow-hidden rounded-2xl border bg-white shadow-sm transition hover:shadow-md ${s?"border-primary ring-2 ring-primary/25":t.featured?"border-primary/50 ring-2 ring-primary/15":"border-gray-200"}`,children:[e.jsxs("div",{className:"relative",children:[e.jsx("label",{className:"absolute right-3 top-3 z-20 flex size-8 cursor-pointer items-center justify-center rounded-lg bg-white/95 shadow-sm",children:e.jsx("input",{type:"checkbox",checked:s,onChange:()=>U(n),disabled:x,className:"size-4 rounded border-gray-300 text-primary focus:ring-primary/30","aria-label":`${t.name} seç`})}),e.jsx(q,{src:t.image,alt:t.name,featured:t.featured,missingImage:r,className:"aspect-[16/10] w-full"})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-5",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("h3",{className:"text-lg font-bold leading-snug text-text-dark line-clamp-2",children:t.name}),e.jsx("p",{className:"text-sm leading-relaxed text-text-light line-clamp-2",children:t.subtitle||"â"}),l?e.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-text-light/90",children:l}):null]}),a.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[a.slice(0,3).map((C,ce)=>e.jsx("span",{className:"rounded-lg bg-gray-100 px-2.5 py-1 text-xs font-medium text-text-dark",children:C},ce)),a.length>3&&e.jsxs("span",{className:"rounded-lg bg-gray-100 px-2.5 py-1 text-xs font-medium text-text-light",children:["+",a.length-3]})]}),e.jsxs("div",{className:"mt-auto flex items-center justify-between gap-3 rounded-xl bg-gray-50/90 px-4 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-light",children:"Gecelik"}),e.jsxs("p",{className:"text-xl font-black tabular-nums text-text-dark",children:["âº",H(t.price)]})]}),e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("button",{type:"button",title:"Düzenle",className:"flex size-10 items-center justify-center rounded-xl border border-gray-200 bg-white text-text-light transition hover:border-primary hover:text-primary",onClick:()=>o(P({name:"editRoom",props:{room:t}})),children:e.jsx("span",{className:"material-symbols-outlined text-[22px]",children:"edit"})}),e.jsx("button",{type:"button",title:"Sil",className:"flex size-10 items-center justify-center rounded-xl border border-gray-200 bg-white text-text-light transition hover:border-red-200 hover:text-red-600 disabled:opacity-50",onClick:()=>Y(t.id),disabled:x,children:e.jsx("span",{className:"material-symbols-outlined text-[22px]",children:"delete"})})]})]})]})]},n)})}):e.jsx("div",{className:"overflow-hidden rounded-2xl border border-gray-200",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:[e.jsx("thead",{className:"bg-gray-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-10 px-3 py-3",children:e.jsx("input",{type:"checkbox",checked:S,ref:t=>{t&&(t.indeterminate=ie)},onChange:V,disabled:x,className:"size-4 rounded border-gray-300 text-primary focus:ring-primary/30","aria-label":"Sayfadaki tümünü seç"})}),e.jsx("th",{className:"w-16 px-3 py-3 text-left text-xs font-bold uppercase tracking-wide text-text-light",children:"Görsel"}),e.jsx("th",{className:"px-3 py-3 text-left text-xs font-bold uppercase tracking-wide text-text-light",children:"Oda"}),e.jsx("th",{className:"px-3 py-3 text-left text-xs font-bold uppercase tracking-wide text-text-light",children:"Tip / Kapasite"}),e.jsx("th",{className:"px-3 py-3 text-left text-xs font-bold uppercase tracking-wide text-text-light",children:"Fiyat"}),e.jsx("th",{className:"px-3 py-3 text-left text-xs font-bold uppercase tracking-wide text-text-light",children:"Durum"}),e.jsx("th",{className:"px-3 py-3 text-right text-xs font-bold uppercase tracking-wide text-text-light",children:"İÅlem"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-100 bg-white",children:p.map(t=>{const a=E(t),l=b.has(a),n=K.has(String(t.id)),s=[t.type,`${t.capacity||2}
1 kiÅi`].filter(Boolean).join(" · ");return e.jsxs("tr",{className:`transition ${l?"bg-primary/5":"hover:bg-gray-50/80"}`,children:[e.jsx("td",{className:"px-3 py-3 align-middle",children:e.jsx("input",{type:"checkbox",checked:l,onChange:()=>U(a),disabled:x,className:"size-4 rounded border-gray-300 text-primary focus:ring-primary/30","aria-label":`${t.name} seç`})}),e.jsx("td",{className:"w-16 px-3 py-3 align-middle",children:e.jsx(q,{src:t.image,alt:t.name,missingImage:n,className:"size-12 rounded-lg"})}),e.jsxs("td",{className:"max-w-[240px] px-3 py-3 align-middle",children:[e.jsx("p",{className:"truncate font-semibold text-text-dark",title:t.name,children:t.name}),e.jsx("p",{className:"truncate text-xs text-text-light",title:t.subtitle||"",children:t.subtitle||"â"})]}),e.jsx("td",{className:"whitespace-nowrap px-3 py-3 align-middle text-text-light",children:s||"â"}),e.jsxs("td",{className:"whitespace-nowrap px-3 py-3 align-middle font-bold tabular-nums text-text-dark",children:["âº",H(t.price)]}),e.jsx("td",{className:"px-3 py-3 align-middle",children:t.featured?e.jsx("span",{className:"inline-flex rounded-lg bg-primary/10 px-2 py-0.5 text-[10px] font-bold uppercase text-primary",children:"Ãne çıkan"}):e.jsx("span",{className:"text-xs text-text-light",children:"â"})}),e.jsx("td",{className:"px-3 py-3 align-middle",children:e.jsxs("div",{className:"flex justify-end gap-1.5",children:[e.jsx("button",{type:"button",title:"Düzenle",disabled:x,className:"inline-flex size-9 items-center justify-center rounded-xl border border-gray-200 bg-white text-text-light transition hover:border-primary hover:text-primary disabled:opacity-50",onClick:()=>o(P({name:"editRoom",props:{room:t}})),children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),e.jsx("button",{type:"button",title:"Sil",disabled:x,className:"inline-flex size-9 items-center justify-center rounded-xl border border-gray-200 bg-white text-text-light transition hover:border-red-200 hover:text-red-600 disabled:opacity-50",onClick:()=>Y(t.id),children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})})]},a)})})]})})})}),!w&&!g&&p.length>0&&e.jsxs("div",{className:"flex flex-col items-center gap-4 border-t border-gray-100 bg-gray-50/40 px-5 py-5 sm:flex-row sm:justify-between sm:px-6",children:[e.jsxs("p",{className:"order-2 text-sm text-text-light sm:order-1",children:["Sayfa ",e.jsx("span",{className:"font-semibold text-text-dark",children:d})," /"," ",v]}),e.jsxs("nav",{className:"order-1 flex flex-wrap items-center justify-center gap-1 sm:order-2","aria-label":"Sayfa numaraları",children:[e.jsx("button",{type:"button",className:"flex size-10 items-center justify-center rounded-xl border border-gray-200 bg-white text-text-light shadow-sm transition hover:border-primary hover:text-primary disabled:cursor-not-allowed disabled:opacity-40",onClick:()=>M(d-1),disabled:d===1,"aria-label":"Ãnceki sayfa",children:e.jsx("span",{className:"material-symbols-outlined text-[22px]",children:"chevron_left"})}),Array.from({length:v}).map((t,a)=>e.jsx("button",{type:"button",className:`flex min-w-10 items-center justify-center rounded-xl px-3 py-2 text-sm font-semibold transition ${d===a+1?"bg-primary text-white shadow-sm shadow-primary/30":"border border-transparent text-text-light hover:bg-white hover:shadow-sm"}`,onClick:()=>M(a+1),children:a+1},a+1)),e.jsx("button",{type:"button",className:"flex size-10 items-center justify-center rounded-xl border border-gray-200 bg-white text-text-light shadow-sm transition hover:border-primary hover:text-primary disabled:cursor-not-allowed disabled:opacity-40",onClick:()=>M(d+1),disabled:d===v,"aria-label":"Sonraki sayfa",children:e.jsx("span",{className:"material-symbols-outlined text-[22px]",children:"chevron_right"})})]})]})]})]}),e.jsxs(B,{open:te,onClose:Q,className:"relative z-[120]",children:[e.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":"true"}),e.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:e.jsxs(B.Panel,{className:"w-full max-w-md rounded-3xl border border-gray-200 bg-white p-6 shadow-2xl dark:border-[#2a2a2a] dark:bg-[#151515]",children:[e.jsx(B.Title,{className:"text-lg font-black text-text-dark dark:text-text-dark-dark",children:"Türkçe Odaları Ãevir"}),u?e.jsx("div",{className:"mt-4 space-y-4",children:e.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-primary/15 bg-primary/5 px-4 py-4",children:[e.jsx("span",{className:"material-symbols-outlined animate-spin text-2xl text-primary",children:"progress_activity"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-text-dark dark:text-text-dark-dark",children:"Oda kayıtları çevriliyor"}),e.jsx("p",{className:"text-sm text-text-light dark:text-text-light-dark",children:"Modal, iÅlem bitene kadar açık kalacak. Lütfen bekleyin."})]})]})}):e.jsxs("div",{className:"mt-4 space-y-4",children:[e.jsxs("p",{className:"text-sm leading-6 text-text-light dark:text-text-light-dark",children:[e.jsx("strong",{className:"font-semibold text-text-dark dark:text-text-dark-dark",children:c.toUpperCase()})," ","dili için tüm oda kayıtları Türkçe kaynaklardan yeniden üretilecek. Mevcut hedef dil odaları güncellenebilir."]}),e.jsx("div",{className:"rounded-2xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-100",children:"KaydedilmemiÅ deÄiÅiklikleriniz varsa önce kaydetmeniz önerilir."})]}),e.jsxs("div",{className:"mt-6 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[e.jsx("button",{type:"button",onClick:Q,disabled:u,className:"rounded-xl border border-gray-200 px-4 py-2 text-sm font-semibold text-text-light transition-colors hover:border-primary hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-[#2a2a2a]",children:"Vazgeç"}),e.jsx("button",{type:"button",onClick:oe,disabled:u,className:"rounded-xl bg-primary px-5 py-2 text-sm font-semibold text-white transition-colors hover:bg-primary-dark disabled:cursor-not-allowed disabled:opacity-50",children:u?"Ãevriliyor...":"Ãeviriyi BaÅlat"})]})]})})]})]})}export{ke as AdminRooms};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.