14 std::vector<std::string>
lines;
15 lines.reserve(_rows.size());
16 for (
auto& [
label, value] : _rows)
18 lines.push_back(value.empty() ? std::move(
label) : std::format(
"{}: {}",
label, value));
39 if (!
spec.CustomLabel.empty())
42 .Prompt = std::move(
spec.CustomPrompt),
56 .MaxLength =
spec.MaxInputLength});
72 if (
spec.ConfirmLabel.empty())
74 spec.ConfirmLabel =
"Confirm";
76 if (
spec.CancelLabel.empty())
78 spec.CancelLabel =
"Cancel";
std::vector< std::string > Take() &&
int ParseDuration(std::string_view text)
static std::string ReadFile(const std::filesystem::path &path)
std::shared_ptr< Menu > BuildDurationMenu(DurationMenu spec)
std::shared_ptr< Menu > BuildConfirmMenu(ConfirmMenu spec)