import omni.ui as ui


class SeparatorDelegate(ui.MenuDelegate):
    """Menu delegate for separator"""
    def build_item(self, _):
        with ui.HStack():
            ui.Spacer(width=24)
            ui.Line(height=10, style_type_name_override="MenuItem.Separator")
            ui.Spacer(width=8)


class OptionSeparator(ui.MenuItem):
    """A simple separator"""
    def __init__(self):
        super().__init__("##OPTION_SEPARATOR", delegate=SeparatorDelegate(), enabled=False)
