import*as i18n from"../i18n/i18n.js";const UIStrings={topAppliedToAStatically:"`Top` applied to a statically positioned element",leftAppliedToAStatically:"`Left` applied to a statically positioned element",rightAppliedToAStatically:"`Right` applied to a statically positioned element",bottomAppliedToAStatically:"`Bottom` applied to a statically positioned element",widthAppliedToAnInlineElement:"`Width` applied to an inline element",heightAppliedToAnInlineElement:"`Height` applied to an inline element",verticalAlignmentAppliedTo:"Vertical alignment applied to element which is neither `inline` nor `table-cell`"},str_=i18n.i18n.registerUIStrings("css_overview/CSSOverviewUnusedDeclarations.ts",UIStrings),i18nString=i18n.i18n.getLocalizedString.bind(void 0,str_);export class CSSOverviewUnusedDeclarations{static _add(t,i,e){const n=t.get(i)||[];n.push(e),t.set(i,n)}static checkForUnusedPositionValues(t,i,e,n,l,a,o,d){if("static"===e[n]){if("auto"!==e[l]){const n=i18nString(UIStrings.topAppliedToAStatically);this._add(t,n,{declaration:`top: ${e[l]}`,nodeId:i})}if("auto"!==e[a]){const n=i18nString(UIStrings.leftAppliedToAStatically);this._add(t,n,{declaration:`left: ${e[a]}`,nodeId:i})}if("auto"!==e[o]){const n=i18nString(UIStrings.rightAppliedToAStatically);this._add(t,n,{declaration:`right: ${e[o]}`,nodeId:i})}if("auto"!==e[d]){const n=i18nString(UIStrings.bottomAppliedToAStatically);this._add(t,n,{declaration:`bottom: ${e[d]}`,nodeId:i})}}}static checkForUnusedWidthAndHeightValues(t,i,e,n,l,a){if("inline"===e[n]){if("auto"!==e[l]){const n=i18nString(UIStrings.widthAppliedToAnInlineElement);this._add(t,n,{declaration:`width: ${e[l]}`,nodeId:i})}if("auto"!==e[a]){const n=i18nString(UIStrings.heightAppliedToAnInlineElement);this._add(t,n,{declaration:`height: ${e[a]}`,nodeId:i})}}}static checkForInvalidVerticalAlignment(t,i,e,n,l){if(e[n]&&"inline"!==e[n]&&!e[n].startsWith("table")&&"baseline"!==e[l]){const n=i18nString(UIStrings.verticalAlignmentAppliedTo);this._add(t,n,{declaration:`vertical-align: ${e[l]}`,nodeId:i})}}}