/*
 * Copyright (c) 2018, 2026, 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-tsx-5-tag-obs";const DESCRIPT="Obsolete HTML5 elements must not be used";const SHORT=DESCRIPT;function Rule(){};Rule.prototype.getName=function(){return RULE_NAME};Rule.prototype.getShortDescription=function(){return SHORT};Rule.prototype.getDescription=function(){return DESCRIPT};Rule.prototype.register=function(regCtx){this._tsxUtils=regCtx.utils.tsxUtils;return{"TsxRenderComponent":this._onTsxRC}};Rule.prototype._onTsxRC=function(ruleCtx,tsxRC){tsxRC.components.forEach(tsxComp=>{this._checkComp(ruleCtx,tsxComp)})};Rule.prototype._checkComp=function(ruleCtx,tsxComp){var tagName=tsxComp.name;if(this._tsxUtils.isHtml5ObsoleteElem(tagName)){let issue=new ruleCtx.Issue(`Element <${tagName}> is obsolete in HTML5`);issue.setPosition(tsxComp.loc.start.line,tsxComp.loc.start.column,tsxComp.range[0],tsxComp.range[1]);ruleCtx.reporter.addIssue(issue,ruleCtx)}if(tsxComp.children){tsxComp.children.forEach(child=>{this._checkComp(ruleCtx,child)})}};module.exports=Rule;