import { bind, Variable } from 'astal'; import { Gtk, Widget } from 'astal/gtk3'; import AstalWp from 'gi://AstalWp'; import Separator from '../misc/separator'; import Streams from './streams'; import Profiles from './profiles'; export default () => { const audio = AstalWp.get_default()?.get_audio(); if (!audio) { throw new Error('Could not find default audio devices.'); } const Shown = Variable('outputs'); const stack = ( {bind(audio, 'speakers').as(Streams)} {bind(audio, 'microphones').as(Streams)} {bind(audio, 'devices').as(Profiles)} ) as Widget.Stack; const StackButton = ({ label = '', iconName = '' }) => ( ) as Widget.Button; return ( {stack} ); };