/*
 * 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 RULE_NAME="oj-html-ojevent";function getName(){return RULE_NAME};function getShortDescription(){return"Web component event attribute must be valid"};function getDescription(){return"Web component event attribute (e.g. \"on-oj-action\") must be a defined event for the component."};function register(){return{"event":_onEvent}};function _onEvent(ruleCtx,attrName){var tagName,issue,metaLib;metaLib=ruleCtx.utils.metaLib;tagName=ruleCtx.tag;if(!metaLib.isTagEvent(tagName,attrName)){if(metaLib.isWCTag(tagName)){if(!_specialCase(tagName,attrName,metaLib)){issue=new ruleCtx.Issue("<"+tagName+"> event '"+attrName+"' is unknown");ruleCtx.reporter.addIssue(issue,ruleCtx)}}}};function _specialCase(tagName,attrName,metaLib){if(tagName==="oj-messages"&&attrName==="on-oj-close"){return true}return metaLib.isRuleIgnored(tagName,RULE_NAME)};module.exports={getName,getDescription,getShortDescription,register};