/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */

"use strict";var e=require("@lexical/link"),r=require("@lexical/react/LexicalComposerContext"),t=require("react");function n(r,n,i,o){t.useEffect(()=>{r.hasNodes([e.AutoLinkNode])||function(e,...r){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const e of r)n.append("v",e);throw t.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77)}),t.useEffect(()=>e.registerAutoLink(r,{changeHandlers:i?[i]:[],excludeParents:o??[],matchers:n}),[r,n,i,o])}exports.createLinkMatcherWithRegExp=e.createLinkMatcherWithRegExp,exports.AutoLinkPlugin=function({matchers:e,onChange:t,excludeParents:i}){const[o]=r.useLexicalComposerContext();return n(o,e,t,i),null};
