import{d as e}from"./objectSpread2-DtFdQpqy.js";import{a as t,n}from"./preload-helper-EQ20WQt-.js";import{o as r}from"./prop-types-DdDwMzX7.js";import{N as i,lt as a}from"./poll-UAe1CGVf.js";import{Ca as o,Zi as s,jo as c}from"./time-C7shVqCd.js";import{t as l}from"./classnames-CFUb2mE1.js";import{fn as u,ln as d,un as f}from"./status_quoted-CRoil4HW.js";import{t as p}from"./category-qp9LUA9B.js";import{t as m}from"./block-Bhu7dt6W.js";import{t as h}from"./visibility_off-C10v3YuE.js";import{t as g}from"./campaign-CrO41jU_.js";var _=e(t()),v=e(l()),y=n(),b=({accountId:e,acct:t})=>{let n=c(),[l,b]=(0,_.useState)(!1),x=t.split(`@`)[1],S=(0,_.useCallback)(()=>{n(s({modalType:void 0,ignoreFocus:!1})),n(o(e))},[n,e]),C=(0,_.useCallback)(()=>{n(s({modalType:void 0,ignoreFocus:!1}))},[n]),w=(0,_.useCallback)(()=>{b(!l)},[l,b]);return(0,y.jsxs)(`div`,{className:`modal-root__modal safety-action-modal`,children:[(0,y.jsxs)(`div`,{className:`safety-action-modal__top`,children:[(0,y.jsxs)(`div`,{className:`safety-action-modal__header`,children:[(0,y.jsx)(`div`,{className:`safety-action-modal__header__icon`,children:(0,y.jsx)(a,{icon:m})}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`h1`,{children:(0,y.jsx)(r,{id:`block_modal.title`,defaultMessage:`Block user?`})}),(0,y.jsxs)(`p`,{children:[`@`,t]})]})]}),(0,y.jsxs)(`ul`,{className:`safety-action-modal__bullet-points`,children:[(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`div`,{className:`safety-action-modal__bullet-points__icon`,children:(0,y.jsx)(a,{icon:g})}),(0,y.jsx)(`div`,{children:(0,y.jsx)(r,{id:`block_modal.they_will_know`,defaultMessage:`They can see that they're blocked.`})})]}),(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`div`,{className:`safety-action-modal__bullet-points__icon`,children:(0,y.jsx)(a,{icon:h})}),(0,y.jsx)(`div`,{children:(0,y.jsx)(r,{id:`block_modal.they_cant_see_posts`,defaultMessage:`They can't see your content and you won't see theirs.`})})]}),(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`div`,{className:`safety-action-modal__bullet-points__icon`,children:(0,y.jsx)(a,{icon:d})}),(0,y.jsx)(`div`,{children:(0,y.jsx)(r,{id:`block_modal.you_wont_see_mentions`,defaultMessage:`You won't see posts from others that mention them.`})})]}),(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`div`,{className:`safety-action-modal__bullet-points__icon`,children:(0,y.jsx)(a,{icon:i})}),(0,y.jsx)(`div`,{children:(0,y.jsx)(r,{id:`block_modal.they_cant_mention`,defaultMessage:`You can't mention, follow, or quote each other.`})})]}),u()&&(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`div`,{className:`safety-action-modal__bullet-points__icon`,children:(0,y.jsx)(a,{icon:p})}),(0,y.jsx)(`div`,{children:(0,y.jsx)(r,{id:`block_modal.no_collections`,defaultMessage:`Neither of you can add each other to collections. You'll be automatically removed from each others' existing collections, if applicable.`})})]})]})]}),(0,y.jsxs)(`div`,{className:(0,v.default)(`safety-action-modal__bottom`,{active:l}),children:[x&&(0,y.jsx)(`div`,{className:`safety-action-modal__bottom__collapsible`,children:(0,y.jsx)(`div`,{className:`safety-action-modal__caveats`,children:(0,y.jsx)(r,{id:`block_modal.remote_users_caveat`,defaultMessage:`We will ask the server {domain} to respect your decision. However, compliance is not guaranteed since some servers may handle blocks differently. Public posts may still be visible to non-logged-in users.`,values:{domain:(0,y.jsx)(`strong`,{children:x})}})})}),(0,y.jsxs)(`div`,{className:`safety-action-modal__actions`,children:[x&&(0,y.jsx)(`button`,{onClick:w,className:`link-button`,children:l?(0,y.jsx)(r,{id:`block_modal.show_less`,defaultMessage:`Show less`}):(0,y.jsx)(r,{id:`block_modal.show_more`,defaultMessage:`Show more`})}),(0,y.jsx)(`div`,{className:`spacer`}),(0,y.jsx)(`button`,{onClick:C,className:`link-button`,children:(0,y.jsx)(r,{id:`confirmation_modal.cancel`,defaultMessage:`Cancel`})}),(0,y.jsx)(f,{onClick:S,dangerous:!0,autoFocus:!0,children:(0,y.jsx)(r,{id:`confirmations.block.confirm`,defaultMessage:`Block`})})]})]})]})};export{b as BlockModal,b as default};
//# sourceMappingURL=block_modal-CdyYIeBR.js.map