/*
 * 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-wctag-packprivate";const DESCRIPTION="Components marked as 'packPrivate' in their component.json metadata, are private base classes "+"that can be extended by other classes in the same pack. They cannot be used as application "+"'stand-alone' components.";const SHORT_DESCRIPTION="'packPrivate' components cannot be used as application 'stand-alone' components.";const JETWC_USE_PUBLIC_APIS="jetwc-use-public-apis";class Rule{getName(){return RULENAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(){return{startaudit:this._onStartAudit,webcomp:this._onWebComp}}_onWebComp(ruleCtx,tag){if(ruleCtx.utils.metaLib.isTagPackPrivate(tag)){let issue=new ruleCtx.Issue(`<${tag}> is not intended for stand-alone use in an application`);ruleCtx.reporter.addIssue(issue,ruleCtx)}}_onStartAudit(ruleCtx){if(ruleCtx.rulePack.isRuleEnabled(JETWC_USE_PUBLIC_APIS,"JETWC")){ruleCtx.utils.msgLib.info(`Rule ${RULENAME} has disabled itself - deferring to rule ${JETWC_USE_PUBLIC_APIS}.`);ruleCtx.rulePack.disableRule(RULENAME)}}}module.exports=Rule;