{"version":3,"file":"show-images-selector.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/show-images-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,UAAU,EAAgC,MAAM,wBAAwB,CAAC;AAS9G;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,SAAS;IACzD,OAAO,CAAC,UAAU,CAAa;IAE/B,YAAY,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,EAAE,QAAQ,EAAE,MAAM,IAAI,EA6BzF;IAED,aAAa,IAAI,UAAU,CAE1B;CACD","sourcesContent":["import { Container, type SelectItem, SelectList, type SelectListLayoutOptions } from \"@earendil-works/pi-tui\";\nimport { getSelectListTheme } from \"../theme/theme.js\";\nimport { DynamicBorder } from \"./dynamic-border.js\";\n\nconst SHOW_IMAGES_SELECT_LIST_LAYOUT: SelectListLayoutOptions = {\n\tminPrimaryColumnWidth: 12,\n\tmaxPrimaryColumnWidth: 32,\n};\n\n/**\n * Component that renders a show images selector with borders\n */\nexport class ShowImagesSelectorComponent extends Container {\n\tprivate selectList: SelectList;\n\n\tconstructor(currentValue: boolean, onSelect: (show: boolean) => void, onCancel: () => void) {\n\t\tsuper();\n\n\t\tconst items: SelectItem[] = [\n\t\t\t{ value: \"yes\", label: \"Yes\", description: \"Show images inline in terminal\" },\n\t\t\t{ value: \"no\", label: \"No\", description: \"Show text placeholder instead\" },\n\t\t];\n\n\t\t// Add top border\n\t\tthis.addChild(new DynamicBorder());\n\n\t\t// Create selector\n\t\tthis.selectList = new SelectList(items, 5, getSelectListTheme(), SHOW_IMAGES_SELECT_LIST_LAYOUT);\n\n\t\t// Preselect current value\n\t\tthis.selectList.setSelectedIndex(currentValue ? 0 : 1);\n\n\t\tthis.selectList.onSelect = (item) => {\n\t\t\tonSelect(item.value === \"yes\");\n\t\t};\n\n\t\tthis.selectList.onCancel = () => {\n\t\t\tonCancel();\n\t\t};\n\n\t\tthis.addChild(this.selectList);\n\n\t\t// Add bottom border\n\t\tthis.addChild(new DynamicBorder());\n\t}\n\n\tgetSelectList(): SelectList {\n\t\treturn this.selectList;\n\t}\n}\n"]}