/*
 * 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 RULENAME="oj-html-no-style-tag";const DESCRIPTION="In-line CSS in a <style> section is not permitted and should be declared in a CSS file.";const SHORT_DESCRIPTION="In-line CSS should be in a CSS file, not in a <style> section";class Rule{getName(){return RULENAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){if(regCtx.rulePack.isRuleEnabled("oj-html-no-style")){return false}return{"<style>":this._onStyle}}_onStyle(ruleCtx){if(!ruleCtx.rulePack.isRuleEnabled("csp-html-style-unsafe-inline","CSP")){let issue=new ruleCtx.Issue("In-line CSS in a <style> section is not permitted - use a .css file");ruleCtx.reporter.addIssue(issue,ruleCtx)}}}module.exports=Rule;