28 for (
const auto& [label, seconds] : spec.
Presets)
30 builder.
Button(label, [pick = spec.
Pick, seconds](
int slot) {
39 if (!spec.CustomLabel.empty())
41 builder.Add(InputRow{.Label = std::move(spec.CustomLabel),
42 .Prompt = std::move(spec.CustomPrompt),
44 [pick = spec.Pick](
int slot, std::string_view text) {
56 .MaxLength = spec.MaxInputLength});
59 return builder.Build();
66 for (
const auto& line : spec.
Lines)
89 builder.
Add(MenuItem{.Describe = [label = std::move(spec.CancelLabel)](int) {
return MenuRow{.Label = label}; },
91 [cancel = std::move(spec.Cancel)](
int slot, MenuSurface& surface) {
98 surface.CloseAll(slot);
102 return builder.
Build();