import { bind, Variable } from 'astal'; import { BarBoxChild, BarModule } from 'src/lib/types/bar'; import { BarButtonStyles } from 'src/lib/types/options'; import options from 'src/options'; const { style } = options.theme.bar.buttons; const undefinedVar = Variable(undefined); export const Module = ({ icon, textIcon, useTextIcon = bind(Variable(false)), label, tooltipText, boxClass, isVis, props = {}, showLabelBinding = bind(undefinedVar), showLabel, labelHook, hook, }: BarModule): BarBoxChild => { const getIconWidget = (useTxtIcn: boolean): JSX.Element | undefined => { let iconWidget: JSX.Element | undefined; if (icon !== undefined && !useTxtIcn) { iconWidget = ; } else if (textIcon !== undefined) { iconWidget =