'use strict';
import { createEslintRule } from '@flint/infra/create-eslint-rule';

var __defProp=Object['defineProperty'],__name=(_0x4f2a7f,_0x504de8)=>__defProp(_0x4f2a7f,'name',{'value':_0x504de8,'configurable':!![]});const ruleName='must-not-use-important';const ruleContent='\x0a###\x20**Must\x20not**\x20use\x20!important\x20in\x20CSS\x20or\x20Tailwind\x0a\x0a####\x20Wrong\x0a\x0a.text-primary\x20{\x0a\x20\x20\x20\x20color:\x20var(--color-primary)\x20!important;\x0a}\x0a\x0a<div\x20className=\x22!text-red-500\x22>...</div>\x0a\x0a####\x20Correct\x0a\x0a.text-primary\x20{\x0a\x20\x20\x20\x20color:\x20var(--color-primary);\x0a}\x0a\x0a<div\x20className=\x22text-red-500\x22>Text</div>\x0a\x0a####\x20Why\x0a\x0aUsing\x20!important\x20in\x20CSS\x20or\x20Tailwind\x20creates\x20specificity\x20problems\x20and\x20makes\x20debugging\x20difficult.\x0aUse\x20proper\x20CSS\x20specificity\x20or\x20component\x20structure\x20instead.\x0a';var mustNotUseImportant = createEslintRule(ruleName,ruleContent,__name(function create(_0x35498c){return {'Literal'(_0x22a23f){typeof _0x22a23f['value']==='string'&&containsImportant(_0x22a23f['value'])&&_0x35498c['report']({'node':_0x22a23f,'messageId':ruleName});},'TemplateLiteral'(_0x33ae56){for(const _0x1fce3b of _0x33ae56['quasis']){if(containsImportant(_0x1fce3b['value']['raw'])){_0x35498c['report']({'node':_0x33ae56,'messageId':ruleName});break;}}}};},'create'));function containsImportant(_0x4a1050){let _0x39fc87=![];if(/!important\b/['test'](_0x4a1050))_0x39fc87=!![];else !/[A-Z][a-z]+\s+![a-z]/['test'](_0x4a1050)&&((/(\w+:)?![a-z][a-z0-9-]*-[a-z0-9-]+/['test'](_0x4a1050)||/(^|\s)(\w+:)?![a-z]{2,}(\s|$)/['test'](_0x4a1050))&&(_0x39fc87=!![]));return _0x39fc87;}__name(containsImportant,'containsImportant');

export { mustNotUseImportant as default, ruleName };
