"use client";import{d as p}from"./chunk-AXXPUMFU.js";import{c as S}from"react/compiler-runtime";import{useLexicalComposerContext as _}from"@lexical/react/LexicalComposerContext.js";import{useLexicalNodeSelection as K}from"@lexical/react/useLexicalNodeSelection.js";import{addClassNamesToElement as M,mergeRegister as D,removeClassNamesFromElement as y}from"@lexical/utils";import{$getSelection as A,$isNodeSelection as O,CLICK_COMMAND as L,COMMAND_PRIORITY_LOW as E,KEY_BACKSPACE_COMMAND as R,KEY_DELETE_COMMAND as $}from"lexical";import{useEffect as N}from"react";var g="selected";function P(i){let e=S(16),{nodeKey:l}=i,[t]=_(),[o,n,m]=K(l),c;e[0]!==t||e[1]!==o?(c=r=>{let d=A();return o&&O(d)&&(r.preventDefault(),t.update(()=>{d.getNodes().forEach(h)})),!1},e[0]=t,e[1]=o,e[2]=c):c=e[2];let s=c,f,a;e[3]!==s||e[4]!==m||e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==n?(f=()=>D(t.registerCommand(L,r=>{let d=t.getElementByKey(l);return r.target===d?(r.shiftKey||m(),n(!o),!0):!1},E),t.registerCommand($,s,E),t.registerCommand(R,s,E)),a=[m,t,o,l,s,n],e[3]=s,e[4]=m,e[5]=t,e[6]=o,e[7]=l,e[8]=n,e[9]=f,e[10]=a):(f=e[9],a=e[10]),N(f,a);let u,C;return e[11]!==t||e[12]!==o||e[13]!==l?(u=()=>{let r=t.getElementByKey(l);r!==null&&(o?M(r,g):y(r,g))},C=[t,o,l],e[11]=t,e[12]=o,e[13]=l,e[14]=u,e[15]=C):(u=e[14],C=e[15]),N(u,C),null}function h(i){p(i)&&i.remove()}export{P as HorizontalRuleComponent};
//# sourceMappingURL=component-SX36AJXS.js.map
