import{f as da,j as e,w as ie,x as de,y as Oe,k as l,h as ce,u as ma,p as a,q as ne}from"./silentshield-vendor-lib-BOYiOmBi.js";import{c as E,o as ke,K as ha,N as fa,O as ua,P as pa,Q as xa,u as ga,_ as t,k as o,R as Na,s as i,T as re,C as S,f as P,h as H,i as M,I as ba,U as K,m as D,M as va,S as wa,G as ya,H as Ca,J as ka,x as Sa,B as Se,n as Ma,y as Q,w as k}from"./silentshield-admin.js";import{T as Me,a as De,b as V}from"./silentshield-tabs-BTNm6AzK.js";import{T as Da,a as La,b as Le,c as u,d as Ra,e as p}from"./silentshield-table-D7OkaxR3.js";import{S as Re,L as Te}from"./silentshield-label-CMPShFf3.js";import{E as je,F as Ta}from"./silentshield-vendor-ui-BEc9V-_C.js";import{C as Fa}from"./silentshield-check-JbCO-ozo.js";import{C as Pa,D as J,a as G,b as W,c as X,d as U,e as se}from"./silentshield-dialog-0-B8aaCF.js";import{S as Fe,a as Pe,b as _e,c as Ee,d as f}from"./silentshield-select-I_0kiXhj.js";import{C as _a}from"./silentshield-circle-check-big-NiZTsOJS.js";import{E as Ea}from"./silentshield-eye-C3fJ4UpD.js";import"./silentshield-vendor-charts-CfxhkB09.js";import"./silentshield-chevron-down-DZwGJKhU.js";/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const za=E("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ia=E("MailX",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h9",key:"1j9vog"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m17 17 4 4",key:"1b3523"}],["path",{d:"m21 17-4 4",key:"uinynz"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _=E("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qa=E("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ze=E("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),oe=da(({className:s,...x},g)=>e(je,{ref:g,className:ke("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),...x,children:e(Ta,{className:ke("flex items-center justify-center text-current"),children:e(Fa,{className:"h-4 w-4"})})}));oe.displayName=je.displayName;function Oa(s={}){return ie({queryKey:["mail-log","entries",s],queryFn:()=>ua(s),placeholderData:x=>x})}function ja(s=30){return ie({queryKey:["mail-log","summary",s],queryFn:()=>pa(s)})}function Aa(s){return ie({queryKey:["mail-log","entry",s],queryFn:()=>xa(s),enabled:s!==null})}function Ba(){const s=de();return Oe({mutationFn:ha,onSuccess:()=>{s.invalidateQueries({queryKey:["mail-log"]}),s.invalidateQueries({queryKey:["cleanup"]})}})}function $a(){const s=de();return Oe({mutationFn:fa,onSuccess:()=>{s.invalidateQueries({queryKey:["mail-log"]})}})}const Y={sent:{label:t("Sent","captcha-for-contact-form-7"),color:"default",icon:_a,iconClass:"text-success"},blocked:{label:t("Blocked","captcha-for-contact-form-7"),color:"destructive",icon:wa,iconClass:"text-destructive"},resent:{label:t("Resent","captcha-for-contact-form-7"),color:"secondary",icon:_,iconClass:"text-primary"}},Ie={cf7:"Contact Form 7",wpforms:"WPForms",elementor:"Elementor",gravityforms:"Gravity Forms",fluentform:"Fluent Forms",avada:"Avada",woocommerce:"WooCommerce",wordpress:"WordPress",comments:t("Comments","captcha-for-contact-form-7"),jetform:"JetFormBuilder"};function qe(s){return new Date(s).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Z(){return a(S,{children:[e(P,{className:"pb-2",children:e(D,{className:"h-3 w-24"})}),e(M,{children:e(D,{className:"h-7 w-12"})})]})}const le=20,Ha=["off","5","15","30"],Ka={off:t("Off","captcha-for-contact-form-7"),5:"5s",15:"15s",30:"30s"};function nt(){var ye;const[s,x]=l("30"),[g,Ae]=l("all"),[z,Be]=l("all"),[ee,$e]=l(""),[me,He]=l(""),[L,N]=l(1),[he,R]=l(null),[I,Ke]=l("off"),[fe,ue]=l(!1),[h,b]=l(new Set),[Qe,q]=l(!1),[pe,ae]=l(!1),[Ve,O]=l(!1),[j,A]=l(null),[xe,T]=l(!1),B=de(),{settings:te}=ga(),Je=Number((ye=te==null?void 0:te.global)==null?void 0:ye.protection_mail_log_enable)===1,ge=Number(s),Ge=(L-1)*le;ce(()=>{const c=setTimeout(()=>He(ee),400);return()=>clearTimeout(c)},[ee]);const{data:m,isLoading:Ne}=ja(ge),{data:v,isLoading:We}=Oa({days:ge,limit:le,offset:Ge,status:g!=="all"?g:void 0,form_plugin:z!=="all"?z:void 0,search:me||void 0}),{data:r,isLoading:Xe}=Aa(he),w=Ba(),y=$a(),F=(v==null?void 0:v.data)??[],be=(v==null?void 0:v.total)??0,ve=Math.max(1,Math.ceil(be/le)),Ue=ma(async()=>{ue(!0),await B.invalidateQueries({queryKey:["mail-log"]}),ue(!1)},[B]);ce(()=>{if(I==="off")return;const c=Number(I)*1e3,n=setInterval(()=>{B.invalidateQueries({queryKey:["mail-log"]})},c);return()=>clearInterval(n)},[I,B]),ce(()=>{b(new Set)},[L,g,z,me,s]);const Ye=c=>{x(c),N(1)},we=F.length>0&&F.every(c=>h.has(c.id)),Ze=()=>{b(we?new Set:new Set(F.map(c=>c.id)))},ea=c=>{b(n=>{const d=new Set(n);return d.has(c)?d.delete(c):d.add(c),d})},aa=async()=>{let c=0,n=0;for(const d of h)try{await w.mutateAsync(d),c++}catch{n++}k.success(n?i(t("%1$d entries deleted, %2$d failed","captcha-for-contact-form-7"),c,n):i(t("%d entries deleted","captcha-for-contact-form-7"),c)),b(new Set),q(!1),ae(!1)},ta=async()=>{let c=0,n=0;for(const d of h)try{await y.mutateAsync(d),c++}catch{n++}k.success(n?i(t("%1$d mails resent, %2$d failed","captcha-for-contact-form-7"),c,n):i(t("%d mails resent","captcha-for-contact-form-7"),c)),b(new Set),O(!1)},ca=async()=>{if(j!==null)try{await w.mutateAsync(j),k.success(t("Entry deleted","captcha-for-contact-form-7")),A(null),T(!1),R(null)}catch{k.error(t("Delete failed","captcha-for-contact-form-7"))}},[na,$]=l(!1),ra=async c=>{try{const n=await y.mutateAsync(c);k.success(n.message||t("Mail resent","captcha-for-contact-form-7")),$(!1),R(null)}catch{k.error(t("Resend failed","captcha-for-contact-form-7"))}};return a("div",{className:"space-y-6",children:[a("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[a("div",{children:[e("h1",{className:"text-2xl font-bold tracking-tight",children:t("Mail Log","captcha-for-contact-form-7")}),e("p",{className:"text-muted-foreground",children:t("Sent and blocked form messages","captcha-for-contact-form-7")})]}),a("div",{className:"flex items-center gap-2",children:[e(Me,{value:I,onValueChange:c=>Ke(c),children:e(De,{children:Ha.map(c=>e(V,{value:c,className:"text-xs",children:Ka[c]},c))})}),e(o,{variant:"outline",size:"icon",className:"h-9 w-9",onClick:Ue,disabled:fe,children:e(Na,{className:`h-4 w-4 ${fe?"animate-spin":""}`})}),e(Me,{value:s,onValueChange:Ye,children:a(De,{children:[e(V,{value:"7",className:"text-xs",children:i(t("%d Days","captcha-for-contact-form-7"),7)}),e(V,{value:"30",className:"text-xs",children:i(t("%d Days","captcha-for-contact-form-7"),30)}),e(V,{value:"90",className:"text-xs",children:i(t("%d Days","captcha-for-contact-form-7"),90)})]})})]})]}),!Je&&!Ne&&a("div",{className:"flex items-start gap-3 rounded-lg border border-amber-200 bg-amber-50 p-4 dark:border-amber-900 dark:bg-amber-950/30",children:[e(re,{className:"h-5 w-5 text-amber-600 dark:text-amber-400 shrink-0 mt-0.5"}),a("div",{className:"text-sm",children:[e("p",{className:"font-medium text-amber-800 dark:text-amber-300",children:t("Mail Logging is disabled","captcha-for-contact-form-7")}),e("p",{className:"text-amber-700 dark:text-amber-400 mt-1",children:t('Enable "Mail Logging" in the advanced settings.',"captcha-for-contact-form-7")}),e("a",{href:"#",className:"inline-flex items-center gap-1 text-amber-800 dark:text-amber-300 font-medium mt-2 underline underline-offset-2 hover:no-underline",onClick:c=>{c.preventDefault(),window.location.hash="/advanced"},children:t("Enable Mail Logging","captcha-for-contact-form-7")})]})]}),e("div",{className:"grid gap-4 md:grid-cols-4",children:Ne?a(ne,{children:[e(Z,{}),e(Z,{}),e(Z,{}),e(Z,{})]}):a(ne,{children:[a(S,{children:[e(P,{className:"pb-2",children:a(H,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e(za,{className:"h-3 w-3"})," ",t("Total","captcha-for-contact-form-7")]})}),e(M,{children:e("div",{className:"text-2xl font-bold",children:(m==null?void 0:m.total)??0})})]}),a(S,{children:[e(P,{className:"pb-2",children:a(H,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e(ze,{className:"h-3 w-3 text-success"})," ",t("Sent","captcha-for-contact-form-7")]})}),e(M,{children:e("div",{className:"text-2xl font-bold text-success",children:(m==null?void 0:m.sent)??0})})]}),a(S,{children:[e(P,{className:"pb-2",children:a(H,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e(Ia,{className:"h-3 w-3 text-destructive"})," ",t("Blocked","captcha-for-contact-form-7")]})}),e(M,{children:e("div",{className:"text-2xl font-bold text-destructive",children:(m==null?void 0:m.blocked)??0})})]}),a(S,{children:[e(P,{className:"pb-2",children:a(H,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e(_,{className:"h-3 w-3 text-primary"})," ",t("Resent","captcha-for-contact-form-7")]})}),e(M,{children:e("div",{className:"text-2xl font-bold text-primary",children:(m==null?void 0:m.resent)??0})})]})]})}),a("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[a("div",{className:"flex gap-2 flex-wrap",children:[a(Fe,{value:g,onValueChange:c=>{Ae(c),N(1)},children:[e(Pe,{className:"h-8 w-[140px] text-xs",children:e(_e,{placeholder:t("Status","captcha-for-contact-form-7")})}),a(Ee,{children:[e(f,{value:"all",children:t("All","captcha-for-contact-form-7")}),e(f,{value:"sent",children:t("Sent","captcha-for-contact-form-7")}),e(f,{value:"blocked",children:t("Blocked","captcha-for-contact-form-7")}),e(f,{value:"resent",children:t("Resent","captcha-for-contact-form-7")})]})]}),a(Fe,{value:z,onValueChange:c=>{Be(c),N(1)},children:[e(Pe,{className:"h-8 w-[160px] text-xs",children:e(_e,{placeholder:t("Plugin","captcha-for-contact-form-7")})}),a(Ee,{children:[e(f,{value:"all",children:t("All Plugins","captcha-for-contact-form-7")}),e(f,{value:"cf7",children:"Contact Form 7"}),e(f,{value:"wpforms",children:"WPForms"}),e(f,{value:"elementor",children:"Elementor"}),e(f,{value:"gravityforms",children:"Gravity Forms"}),e(f,{value:"fluentform",children:"Fluent Forms"}),e(f,{value:"avada",children:"Avada"})]})]}),a("div",{className:"relative",children:[e(qa,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),e(ba,{placeholder:t("Search...","captcha-for-contact-form-7"),value:ee,onChange:c=>{$e(c.target.value),N(1)},className:"h-8 w-[200px] pl-7 text-xs"})]})]}),h.size>0&&a("div",{className:"flex items-center gap-2",children:[e("span",{className:"text-xs text-muted-foreground",children:i(t("%d selected","captcha-for-contact-form-7"),h.size)}),a(o,{size:"sm",variant:"default",onClick:()=>O(!0),children:[e(_,{className:"h-3 w-3 mr-1"})," ",t("Resend","captcha-for-contact-form-7")]}),a(o,{size:"sm",variant:"destructive",onClick:()=>q(!0),children:[e(K,{className:"h-3 w-3 mr-1"})," ",t("Delete","captcha-for-contact-form-7")]})]})]}),e(S,{children:e(M,{className:"p-0",children:We?e("div",{className:"p-4 space-y-2",children:[1,2,3,4,5].map(c=>e(D,{className:"h-10 w-full"},c))}):F.length===0?a("div",{className:"text-center py-12 text-sm text-muted-foreground",children:[e(va,{className:"h-8 w-8 mx-auto mb-2 opacity-30"}),t("No entries in the selected period","captcha-for-contact-form-7")]}):a(ne,{children:[a(Da,{children:[e(La,{children:a(Le,{children:[e(u,{className:"w-10 px-2",children:e(oe,{checked:we,onCheckedChange:Ze,"aria-label":t("Select all","captcha-for-contact-form-7")})}),e(u,{className:"text-xs w-[140px]",children:t("Time","captcha-for-contact-form-7")}),e(u,{className:"text-xs w-[90px]",children:t("Status","captcha-for-contact-form-7")}),e(u,{className:"text-xs",children:t("Sender","captcha-for-contact-form-7")}),e(u,{className:"text-xs",children:t("Recipient","captcha-for-contact-form-7")}),e(u,{className:"text-xs",children:t("Subject","captcha-for-contact-form-7")}),e(u,{className:"text-xs w-[100px]",children:t("Form","captcha-for-contact-form-7")}),e(u,{className:"w-10"})]})}),e(Ra,{children:F.map(c=>{const n=Y[c.status]||Y.sent;return a(Le,{className:"cursor-pointer hover:bg-accent",onClick:()=>R(c.id),children:[e(p,{className:"px-2",onClick:d=>d.stopPropagation(),children:e(oe,{checked:h.has(c.id),onCheckedChange:()=>ea(c.id),"aria-label":i(t("Select entry %d","captcha-for-contact-form-7"),c.id)})}),e(p,{className:"text-xs text-muted-foreground",children:qe(c.ts)}),e(p,{children:a(ya,{children:[e(Ca,{asChild:!0,children:e("span",{className:"inline-flex items-center justify-center",children:e(n.icon,{className:`h-4 w-4 ${n.iconClass}`})})}),e(ka,{side:"right",children:e("p",{className:"text-xs",children:n.label})})]})}),e(p,{className:"text-xs max-w-[150px] truncate",children:c.sender||"–"}),e(p,{className:"text-xs max-w-[150px] truncate",children:c.recipient||"–"}),e(p,{className:"text-xs max-w-[200px] truncate",children:c.subject||"–"}),e(p,{className:"text-xs",children:Ie[c.form_plugin]||c.form_plugin||"–"}),e(p,{children:e(o,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d=>{d.stopPropagation(),R(c.id)},children:e(Ea,{className:"h-3 w-3"})})})]},c.id)})})]}),a("div",{className:"flex items-center justify-between p-4 border-t",children:[e("span",{className:"text-xs text-muted-foreground",children:i(t("Page %1$d of %2$d (%3$d total)","captcha-for-contact-form-7"),L,ve,be)}),a("div",{className:"flex gap-1",children:[e(o,{variant:"outline",size:"icon",className:"h-7 w-7",disabled:L===1,onClick:()=>N(c=>c-1),children:e(Pa,{className:"h-3 w-3"})}),e(o,{variant:"outline",size:"icon",className:"h-7 w-7",disabled:L>=ve,onClick:()=>N(c=>c+1),children:e(Sa,{className:"h-3 w-3"})})]})]})]})})}),e(J,{open:he!==null&&j===null,onOpenChange:()=>{R(null),$(!1)},children:a(G,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[a(W,{children:[e(X,{children:t("Mail Details","captcha-for-contact-form-7")}),e(U,{children:t("Complete message information","captcha-for-contact-form-7")})]}),Xe?a("div",{className:"space-y-3",children:[e(D,{className:"h-4 w-full"}),e(D,{className:"h-4 w-3/4"}),e(D,{className:"h-32 w-full"})]}):r?(()=>{const c=Y[r.status]||Y.sent;return a("div",{className:"space-y-4 text-sm",children:[a("div",{className:"grid grid-cols-2 gap-3",children:[a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Status:","captcha-for-contact-form-7")}),e("p",{children:e(Se,{variant:c.color,className:"text-[10px]",children:c.label})})]}),a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Time:","captcha-for-contact-form-7")}),e("p",{className:"text-xs",children:qe(r.ts)})]}),a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Sender:","captcha-for-contact-form-7")}),e("p",{className:"text-xs break-all",children:r.sender||"–"})]}),a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Recipient:","captcha-for-contact-form-7")}),e("p",{className:"text-xs break-all",children:r.recipient||"–"})]}),a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Form:","captcha-for-contact-form-7")}),a("p",{className:"text-xs",children:[Ie[r.form_plugin]||r.form_plugin||"–",r.form_id?` #${r.form_id}`:""]})]}),a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Page:","captcha-for-contact-form-7")}),e("p",{className:"text-xs truncate",children:r.page_url||"–"})]}),r.block_reason&&a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Block Reason:","captcha-for-contact-form-7")}),e("p",{className:"text-xs font-mono",children:r.block_reason})]}),r.ip_hash&&a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("IP Hash:","captcha-for-contact-form-7")}),e("p",{className:"text-xs font-mono break-all",children:r.ip_hash})]})]}),a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Subject:","captcha-for-contact-form-7")}),e("p",{className:"text-xs mt-1 rounded-lg bg-accent p-3 font-medium",children:r.subject||"–"})]}),r.body&&a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Message:","captcha-for-contact-form-7")}),e("pre",{className:"text-xs mt-1 rounded-lg bg-accent p-3 overflow-auto max-h-48 whitespace-pre-wrap",children:r.body})]}),r.form_data&&a("div",{children:[e("span",{className:"text-muted-foreground text-xs",children:t("Form Data:","captcha-for-contact-form-7")}),e("pre",{className:"text-[10px] mt-1 rounded-lg bg-accent p-3 overflow-auto max-h-32 whitespace-pre-wrap",children:(()=>{try{return JSON.stringify(JSON.parse(r.form_data),null,2)}catch{return r.form_data}})()})]}),(()=>{if(!r.meta)return null;let n;try{n=JSON.parse(r.meta)}catch{return null}if(!(n!=null&&n.verdict))return null;const d={human:"text-green-600",suspicious:"text-yellow-600",bot:"text-red-600"},sa={human:"bg-green-500",suspicious:"bg-yellow-500",bot:"bg-red-500"},la=d[n.verdict]||"text-muted-foreground",oa=sa[n.verdict]||"bg-primary",ia={keyboard:"Keyboard",pause:"Pauses",mouse:"Mouse",speed:"Speed",context:"Context",scroll:"Scroll",capabilities:"Capabilities"};return a("div",{className:"rounded-lg border p-3 space-y-2",children:[a("div",{className:"flex items-center gap-2",children:[e(Ma,{className:"h-4 w-4 text-muted-foreground"}),e("span",{className:"text-xs font-medium",children:t("SilentShield Analysis","captcha-for-contact-form-7")})]}),a("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[a("div",{children:[e("span",{className:"text-muted-foreground",children:t("Verdict:","captcha-for-contact-form-7")}),e("p",{className:`font-semibold uppercase ${la}`,children:n.verdict})]}),a("div",{children:[e("span",{className:"text-muted-foreground",children:t("Confidence:","captcha-for-contact-form-7")}),e("p",{className:"font-mono",children:n.confidence!=null?`${(n.confidence*100).toFixed(1)}%`:"–"})]}),n.nonce&&a("div",{children:[e("span",{className:"text-muted-foreground",children:"Nonce:"}),a("p",{className:"font-mono truncate",title:n.nonce,children:[n.nonce.substring(0,12),"…"]})]})]}),n.score_breakdown&&a("div",{className:"space-y-1 pt-1",children:[e("span",{className:"text-muted-foreground text-[10px] uppercase tracking-wider",children:t("Score Breakdown","captcha-for-contact-form-7")}),Object.entries(n.score_breakdown).map(([C,Ce])=>a("div",{className:"flex items-center gap-2 text-[11px]",children:[e("span",{className:"w-20 text-muted-foreground truncate",children:ia[C]||C}),e("div",{className:"flex-1 h-2 bg-accent rounded-full overflow-hidden",children:e("div",{className:`h-full rounded-full transition-all ${oa}`,style:{width:`${Math.max(0,Math.min(100,Ce*100))}%`}})}),a("span",{className:"w-10 text-right font-mono",children:[(Ce*100).toFixed(0),"%"]})]},C))]}),n.reason_codes&&n.reason_codes.length>0&&e("div",{className:"flex flex-wrap gap-1 pt-1",children:n.reason_codes.map(C=>e(Se,{variant:"outline",className:"text-[9px] font-mono",children:C},C))})]})})(),a("div",{className:"flex gap-2 pt-2 border-t",children:[na?a("div",{className:"flex items-center gap-2",children:[e("span",{className:"text-xs text-muted-foreground",children:t("Really resend?","captcha-for-contact-form-7")}),a(o,{size:"sm",onClick:()=>ra(r.id),disabled:y.isPending,children:[y.isPending?e(Q,{className:"h-3 w-3 animate-spin mr-1"}):null,t("Yes, send","captcha-for-contact-form-7")]}),e(o,{size:"sm",variant:"outline",onClick:()=>$(!1),children:t("Cancel","captcha-for-contact-form-7")})]}):a(o,{size:"sm",variant:"default",onClick:()=>$(!0),children:[e(_,{className:"h-3 w-3 mr-1"})," ",t("Resend","captcha-for-contact-form-7")]}),a(o,{size:"sm",variant:"destructive",onClick:()=>{A(r.id),T(!1)},children:[e(K,{className:"h-3 w-3 mr-1"})," ",t("Delete","captcha-for-contact-form-7")]})]})]})})():null]})}),e(J,{open:j!==null,onOpenChange:()=>{A(null),T(!1)},children:a(G,{children:[a(W,{children:[a(X,{className:"flex items-center gap-2",children:[e(re,{className:"h-5 w-5 text-destructive"})," ",t("Delete entry","captcha-for-contact-form-7")]}),e(U,{children:t("This action cannot be undone. Message content and form data will be permanently deleted.","captcha-for-contact-form-7")})]}),a("div",{className:"flex items-center gap-3 rounded-lg border border-destructive/30 bg-destructive/5 p-4",children:[e(Re,{checked:xe,onCheckedChange:T,id:"single-delete-confirm"}),e(Te,{htmlFor:"single-delete-confirm",className:"text-xs cursor-pointer",children:t("I understand that this entry will be permanently deleted","captcha-for-contact-form-7")})]}),a(se,{children:[e(o,{variant:"outline",onClick:()=>{A(null),T(!1)},children:t("Cancel","captcha-for-contact-form-7")}),a(o,{variant:"destructive",disabled:!xe||w.isPending,onClick:ca,children:[w.isPending?e(Q,{className:"h-3 w-3 animate-spin mr-1"}):e(K,{className:"h-3 w-3 mr-1"}),t("Permanently delete","captcha-for-contact-form-7")]})]})]})}),e(J,{open:Qe,onOpenChange:c=>{q(c),c||ae(!1)},children:a(G,{children:[a(W,{children:[a(X,{className:"flex items-center gap-2",children:[e(re,{className:"h-5 w-5 text-destructive"})," ",i(t("Delete %d entries","captcha-for-contact-form-7"),h.size)]}),e(U,{children:t("All selected mail log entries will be permanently deleted.","captcha-for-contact-form-7")})]}),a("div",{className:"flex items-center gap-3 rounded-lg border border-destructive/30 bg-destructive/5 p-4",children:[e(Re,{checked:pe,onCheckedChange:ae,id:"bulk-delete-confirm"}),e(Te,{htmlFor:"bulk-delete-confirm",className:"text-xs cursor-pointer",children:i(t("I understand that %d entries will be permanently deleted","captcha-for-contact-form-7"),h.size)})]}),a(se,{children:[e(o,{variant:"outline",onClick:()=>q(!1),children:t("Cancel","captcha-for-contact-form-7")}),a(o,{variant:"destructive",disabled:!pe||w.isPending,onClick:aa,children:[w.isPending?e(Q,{className:"h-3 w-3 animate-spin mr-1"}):e(K,{className:"h-3 w-3 mr-1"}),i(t("Delete %d entries","captcha-for-contact-form-7"),h.size)]})]})]})}),e(J,{open:Ve,onOpenChange:O,children:a(G,{children:[a(W,{children:[a(X,{className:"flex items-center gap-2",children:[e(_,{className:"h-5 w-5 text-primary"})," ",i(t("Resend %d mails","captcha-for-contact-form-7"),h.size)]}),e(U,{children:t("All selected entries will be resent via wp_mail().","captcha-for-contact-form-7")})]}),a(se,{children:[e(o,{variant:"outline",onClick:()=>O(!1),children:t("Cancel","captcha-for-contact-form-7")}),a(o,{disabled:y.isPending,onClick:ta,children:[y.isPending?e(Q,{className:"h-3 w-3 animate-spin mr-1"}):e(ze,{className:"h-3 w-3 mr-1"}),i(t("Send %d mails","captcha-for-contact-form-7"),h.size)]})]})]})})]})}export{nt as default};
