import { View } from "../core/base/view"; import { Libs } from "../utils/libs"; import type { OptionViewTags, OptionViewResult, OptionConfig, OptionConfigPatch, } from "../types/views/view.option.type"; import { SelectiveOptions } from "../types/utils/selective.type"; /** * OptionView * * View implementation for a single selectable option with reactive configuration. * * ### Responsibility * - Renders an option with input (radio/checkbox) + optional image + label. * - Supports **reactive configuration** via Proxy-based change tracking. * - Applies **incremental DOM updates** for configuration changes (no full re-render). * - Manages input type switching (radio ↔ checkbox) based on selection mode. * - Dynamically creates/removes image elements when {@link hasImage} changes. * * ### Structure * ``` * OptionView (root, role="option") * ├─ OptionInput () * ├─ OptionImage (, conditional) * └─ OptionLabel (