The ConditionViewer components render a read-only summary of a set of rules — one boxed sentence per rule, nested under the operator that combines them.
ConditionViewerGroup interrogates a group — its descriptor, whether it's collapsible
and open, and how many conditions sit directly inside it — and can click its toggle.
ConditionViewerItem interrogates one condition: its sentence, its detail chips, and
whether it renders a marker or actions.
getConditionCount counts only a group's direct children — a nested group counts as one,
not as the conditions inside it. To reach those, extract a helper from the nested group's
element.
Gets the text of each detail chip below the sentence, in document order — the sub-conditions this condition is refined by.
Gets the condition's sentence — the words a reader sees, with the emphasized terms included and whitespace normalized. Excludes the details below it and the actions beside it.
Whether the condition renders its trailing actions area.
Whether the condition renders any detail chips below its sentence.
Whether the condition renders a marker. A condition given no `icon`, `iconSrc` or `iconContent` renders none.
Whether the condition hugs its content instead of filling the available width (`isInline`).
Whether the sentence matches the given text.