from ...common import (CONFIGURATION_PATTERN, CONFIGURATION_BEFORE_STOP_WORDS, IMPACT_BEFORE_STOP_WORDS, IMPACT_PATTERN,
                       ROOT_CAUSE_PATTERN, ROOT_CAUSE_BEFORE_STOP_WORD, WEAKNESS_PATTERN, WEAKNESS_AFTER_STOP_WORDS,
                       CONFIGURATION_AFTER_STOP_WORDS)


# weakness configuration root_cause
WEAKNESS_CONFIG_CAUSE_PATTERN = (
        r'(An |A |)' + WEAKNESS_PATTERN + WEAKNESS_AFTER_STOP_WORDS +
        CONFIGURATION_BEFORE_STOP_WORDS + CONFIGURATION_PATTERN + CONFIGURATION_AFTER_STOP_WORDS +
        ROOT_CAUSE_BEFORE_STOP_WORD + ROOT_CAUSE_PATTERN
)

# weakness configuration root_cause impact
DETAILS_4_1 = (
        WEAKNESS_CONFIG_CAUSE_PATTERN + IMPACT_BEFORE_STOP_WORDS + IMPACT_PATTERN + r'\.$'
)


WEAKNESS_CONFIG_CAUSE_PATTERNS = {
    '4_1': DETAILS_4_1
}
