/*
 * 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-html-attr-prefix-ro";function getName(){return RULE_NAME};function getShortDescription(){return"Colon-prefixed attribute should specify a non-RW expression."};function getDescription(){return"Attributes prefixed with the late-binding indicator <b>':'</b?, should refer to a read-only expression <b>'[[. . .]]'</b> in preference to '{{. . .}}'</b>. "+"Although use of the form '{{...}}' is functional, it is misleading to use a read/write expression that can only be read-only."};function register(){return{"attrexpr":_fnAttr}};function _fnAttr(ruleCtx,attrName,attrValue){var issue,attrPos;if(attrName.charAt(0)===":"&&typeof attrValue==="string"){if(attrValue.trim().startsWith("{{")){issue=new ruleCtx.Issue("Colon-prefixed attribute '"+attrName+"' should use read-only '[[...]]' in preference to '{{...}}'");attrPos=ruleCtx.utils.DomUtils.getAttribPosition(ruleCtx.data,ruleCtx.tagNode,attrName);issue.setPosition(attrPos.row,attrPos.col,attrPos.start,attrPos.end);ruleCtx.reporter.addIssue(issue,ruleCtx)}}};module.exports={getName,getDescription,getShortDescription,register};