/*
 * 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-redwood-cssnovars";const DESCRIPTION="Support for CSS files 'oj-redwood-novars.css' and 'oj-redwood-novars-min.css' will be discontinued in JET 12. Replace with 'oj-redwood.css' or 'oj-redwood-min.css'.";const SHORT_DESCRIPT=DESCRIPTION;const MSG="Support for '@' will be discontinued in JET 12. Use 'oj-redwood.css' or 'oj-redwood-min.css'.";const NOVARS="oj-redwood-novars";const NOVARS_MIN="oj-redwood-novars-min";const HREF="href";class Rule{getName(){return RULENAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPT}register(){return{link:this._onLink}}_onLink(ruleCtx){var attrPos;var attribs=ruleCtx.node.attribs;if(attribs&&attribs.href){if(attribs.href.includes(NOVARS)){let isMin=attribs.href.includes(NOVARS_MIN);let issue=new ruleCtx.Issue(MSG.replace("@",isMin?NOVARS_MIN:NOVARS));attrPos=ruleCtx.utils.DomUtils.getAttribPosition(ruleCtx.data,ruleCtx.node,HREF);issue.setPosition(attrPos.row,attrPos.col,attrPos.start,attrPos.end);ruleCtx.reporter.addIssue(issue,ruleCtx)}}}}module.exports=Rule;