1import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{M as f}from"./Modal-BiZX0Gu0.js";import{B as p}from"./ButtonPrimary-djmnbRYJ.js";import{c as x}from"./ClassesUtils-2dOUpm6k.js";import{u as h}from"./useTranslation-CaKQvU12.js";function M({open:a,setOpen:n,bots:r,effectiveDate:i,onConfirm:c}){const{t}=h(),m=r.length>0?r[0]:null,d=r.length>1?r.length-1:0,l=s=>{if(!s)return"";try{const o=typeof s=="string"?new Date(s):s;return isNaN(o.getTime())?"":new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",timeZoneName:"short"}).format(o)}catch{try{return(typeof s=="string"?new Date(s):s).toISOString()}catch{return""}}},u=()=>{c(),n(!1)},g=()=>{n(!1)};return e.jsx(f,{open:a,setOpen:n,size:"lg",title:t("settings.subscription.preDowngradeModal.title"),children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-foreground",children:t("settings.subscription.preDowngradeModal.body1")}),e.jsx("p",{className:"text-sm text-foreground",children:t("settings.subscription.preDowngradeModal.body2")})]}),e.jsxs("div",{className:"rounded-lg border border-border bg-muted/50 p-4 space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:[t("settings.subscription.preDowngradeModal.keptBot"),":"]}),e.jsx("span",{className:"text-sm text-foreground font-medium",children:m?.name||t("settings.subscription.preDowngradeModal.noBot")})]}),e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:[t("settings.subscription.preDowngradeModal.botsToSuspend"),":"]}),e.jsx("span",{className:"text-sm text-foreground font-medium",children:d>0?t("settings.subscription.preDowngradeModal.botsCount",{count:d}):t("settings.subscription.preDowngradeModal.none")})]}),e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:[t("settings.subscription.preDowngradeModal.effectiveDate"),":"]}),e.jsx("span",{className:"text-sm text-foreground font-medium",children:i?l(i):"-"})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-border",children:[e.jsx(p,{onClick:g,children:t("shared.cancel")}),e.jsx("button",{type:"button",onClick:u,className:x("inline-flex items-center justify-center rounded-md border border-red-300 bg-red-50 px-4 py-2 text-sm font-medium text-red-800 shadow-sm hover:bg-red-100 hover:text-red-900 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2"),children:t("settings.subscription.preDowngradeModal.confirmDowngrade")})]})]})})}export{M as P};
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.