/*
 * 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-cssvars";const SHORT_DESCRIPT="Do not use 'oj-redwood-cssvars' files.  Rename files such 'oj-redwood-cssvars-min.css' to 'oj-redwood-min.css'.";const DESCRIPTION="Files starting with 'oj-redwood-cssvars should NOT be used, and the string '-cssvars' "+" should be removed from the file path.  For example, rename 'oj-redwood-cssvars-min.css' to 'oj-redwood-min.css'.";const MSG="CSS filename contains 'oj-redwood-cssvars'. Rename: e.g. 'oj-redwood-cssvars-min.css' to 'oj-redwood-min.css'.";const BAD_VARS="oj-redwood-cssvars";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(BAD_VARS)){let issue=new ruleCtx.Issue(MSG);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;