# HTML IDs


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## FileBrowserHtmlIds

Default HTML IDs used by the file browser. These can be customized via
[`FileBrowserConfig`](https://cj-mills.github.io/cjm-fasthtml-file-browser/core/config.html#filebrowserconfig)
if needed to avoid conflicts.

------------------------------------------------------------------------

<a
href="https://github.com/cj-mills/cjm-fasthtml-file-browser/blob/main/cjm_fasthtml_file_browser/core/html_ids.py#L13"
target="_blank" style="float:right; font-size:smaller">source</a>

### FileBrowserHtmlIds

``` python

def FileBrowserHtmlIds(
    CONTAINER:str='file-browser', CONTENT:str='file-browser-content', PATH_BAR:str='file-browser-path-bar',
    PATH_INPUT:str='file-browser-path-input', BREADCRUMBS:str='file-browser-breadcrumbs',
    LISTING:str='file-browser-listing', ITEM_PREFIX:str='file-browser-item-',
    CURRENT_PATH_INPUT:str='file-browser-current-path', SELECTED_PATHS_INPUT:str='file-browser-selected-paths',
    BTN_PARENT:str='file-browser-btn-parent', BTN_REFRESH:str='file-browser-btn-refresh',
    BTN_HOME:str='file-browser-btn-home'
)->None:

```

*Default HTML IDs for file browser components.*

``` python
# Test FileBrowserHtmlIds
ids = FileBrowserHtmlIds()

# Test constants
assert ids.CONTAINER == "file-browser"
assert ids.CONTENT == "file-browser-content"
assert ids.PATH_BAR == "file-browser-path-bar"
assert ids.LISTING == "file-browser-listing"

# Test item_id
assert FileBrowserHtmlIds.item_id(0) == "file-browser-item-0"
assert FileBrowserHtmlIds.item_id(42) == "file-browser-item-42"

# Test as_selector
assert FileBrowserHtmlIds.as_selector(ids.CONTAINER) == "#file-browser"
assert FileBrowserHtmlIds.as_selector(ids.LISTING) == "#file-browser-listing"

# Test frozen (immutable)
try:
    ids.CONTAINER = "new-id"
    assert False, "Should have raised FrozenInstanceError"
except Exception:
    pass  # Expected

print("FileBrowserHtmlIds tests passed!")
```
