/*
 * Copyright (c) 2018, 2025, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const RULENAME="oj-html-event-focus-blur";const SHORT_DESCRIPTION="JET Core-Pack components do not dispatch focus or blur events.";const DESCRIPTION=SHORT_DESCRIPTION+" Listen for focusin and focusout events instead.";class Rule{getName(){return RULENAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){this._metaLib=regCtx.utils.metaLib;return{"<on-blur=>":this._onEvent,"<on-focus=>":this._onEvent}}_onEvent(ruleCtx,evName){if(this._metaLib.isJetCoreTag(ruleCtx.tagNode.name)){let suggest="on-focus"+(evName==="on-blur"?"out":"in");let issue=new ruleCtx.Issue(`Event attribute '${evName}' found on JET Core component <${ruleCtx.tagNode.name}> - use '${suggest}'`);ruleCtx.reporter.addIssue(issue,ruleCtx)}}}module.exports=Rule;