# m3e/toc_item

TocItem is an item in a table of contents.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

         DO NOT EDIT

# Types

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(disabled: Disabled, selected: Selected)
    }

### Constructors

-     Config(disabled: Disabled, selected: Selected)

## Disabled

</>

Disabled is a value indicating whether the element is disabled.

    pub type Disabled {
      IsDisabled
      IsNotDisabled
    }

### Constructors

-     IsDisabled

-     IsNotDisabled

## Selected

</>

Selected is whether the element is selected.

    pub type Selected {
      IsSelected
      IsNotSelected
    }

### Constructors

-     IsSelected

-     IsNotSelected

## TocItem

opaque </>

TocItem is a View Model for this component

## Fields:

- disabled: A value indicating whether the element is disabled.
- selected: Whether the element is selected.

    pub opaque type TocItem

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_disabled

</>

    pub const default_disabled: Disabled

## default_selected

</>

    pub const default_selected: Selected

## disabled

</>

    pub fn disabled(record: TocItem, disabled: Disabled) -> TocItem

disabled sets the value of disabled for this TocItem.

## from_config

</>

    pub fn from_config(config: Config) -> TocItem

from_config creates a new TocItem from the given configuration.

## new

</>

    pub fn new() -> TocItem

new creates a new TocItem with the default configuration.

## render

</>

    pub fn render(
      model: TocItem,
      attributes: List(attribute.Attribute(msg)),
      children: List(element.Element(msg)),
    ) -> element.Element(msg)

render creates a Lustre Element for a TocItem

## render_config

</>

    pub fn render_config(
      c: Config,
      attributes: List(attribute.Attribute(msg)),
      children: List(element.Element(msg)),
    ) -> element.Element(msg)

render_config creates a Lustre Element from a TocItem Config

## selected

</>

    pub fn selected(record: TocItem, selected: Selected) -> TocItem

selected sets the value of selected for this TocItem.

✨