import { Container, SettingsList } from "@earendil-works/pi-tui";
import { getSettingsListTheme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";
import { createSettingsChangeHandler } from "./settings-selector-handlers.js";
import { buildSettingsItems } from "./settings-selector-items.js";
/**
 * Main settings selector component.
 */
export class SettingsSelectorComponent extends Container {
    constructor(config, callbacks) {
        super();
        this.addChild(new DynamicBorder());
        this.settingsList = new SettingsList(buildSettingsItems(config, callbacks), 10, getSettingsListTheme(), createSettingsChangeHandler(callbacks), callbacks.onCancel, { enableSearch: true });
        this.addChild(this.settingsList);
        this.addChild(new DynamicBorder());
    }
    getSettingsList() {
        return this.settingsList;
    }
}
//# sourceMappingURL=settings-selector.js.map