import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{n,pn as r,s as i,t as a}from"./iframe-GmIo3IOR.js";import{n as o,t as s}from"./Button-Dk2YMZua.js";function c({onPreRemove:e,onRemove:t,className:n}){let[r,a]=(0,l.useState)(!1),o=(0,l.useRef)(null);return(0,u.jsx)(s,{icon:(0,u.jsx)(i,{}),onClick:n=>{n.preventDefault(),o.current&&=(window.clearTimeout(o.current),null),r?(t(),a(!1)):(e?.(),a(!0),o.current=window.setTimeout(()=>{a(!1)},1500))},tone:`error`,appearance:r?`solid`:`outline`,className:n})}var l,u,d=t((()=>{l=e(r(),1),n(),o(),u=a(),c.__docgenInfo={description:"Специализированная кнопка удаления сущности или вложения. Инкапсулирует подтверждающее поведение перед окончательным вызовом `onRemove`.",methods:[],displayName:`ButtonRemove`,props:{onRemove:{required:!0,tsType:{name:`signature`,type:`function`,raw:`() => void`,signature:{arguments:[],return:{name:`void`}}},description:``},onPreRemove:{required:!1,tsType:{name:`signature`,type:`function`,raw:`() => void`,signature:{arguments:[],return:{name:`void`}}},description:``},className:{required:!1,tsType:{name:`string`},description:``}}}})),f=t((()=>{o(),d()}));export{f as t};