import { bind, idle } from 'astal'; import { Gtk, Widget } from 'astal/gtk3'; import { register } from 'astal/gobject'; import AstalBluetooth from 'gi://AstalBluetooth'; import Separator from '../misc/separator'; @register() export default class DeviceWidget extends Widget.Revealer { readonly dev: AstalBluetooth.Device; constructor({ dev }: { dev: AstalBluetooth.Device }) { const rev = ( TODO: add buttons here ) as Widget.Revealer; const button = ( ); super({ revealChild: false, transitionType: Gtk.RevealerTransitionType.SLIDE_DOWN, child: ( {button} {rev} ), }); this.dev = dev; this.connect('realize', () => idle(() => { this.revealChild = true; })); }; };