| 3775 | }) |
| 3776 | |
| 3777 | const renderToggle = ( |
| 3778 | value: boolean, |
| 3779 | options: ToggleOptionsReq, |
| 3780 | submitted: boolean = false |
| 3781 | ) => { |
| 3782 | const separator = Ansi.annotate("/", Ansi.blackBright) |
| 3783 | const selectedAnnotation = Ansi.combine(Ansi.underlined, submitted ? Ansi.white : Ansi.cyanBright) |
| 3784 | const inactive = value |
| 3785 | ? options.inactive |
| 3786 | : Ansi.annotate(options.inactive, selectedAnnotation) |
| 3787 | const active = value |
| 3788 | ? Ansi.annotate(options.active, selectedAnnotation) |
| 3789 | : options.active |
| 3790 | return active + " " + separator + " " + inactive |
| 3791 | } |
| 3792 | |
| 3793 | const renderToggleOutput = ( |
| 3794 | toggle: string, |