mapcomplete/Customizations/Questions/bike/PumpValves.ts

29 lines
1 KiB
TypeScript
Raw Normal View History

import {TagRenderingOptions} from "../../TagRendering";
import {Tag} from "../../../Logic/TagsFilter";
2020-07-20 21:43:42 +00:00
import Translations from "../../../UI/i18n/Translations";
2020-07-16 07:54:32 +00:00
2020-07-16 13:32:32 +00:00
export default class PumpValves extends TagRenderingOptions{
2020-07-16 07:54:32 +00:00
constructor() {
const to = Translations.t.cyclofix.station.valves
2020-07-16 07:54:32 +00:00
super({
2020-07-20 21:43:42 +00:00
question: to.question.Render(),
2020-07-16 07:54:32 +00:00
mappings: [
{
k: new Tag("valves", " sclaverand;schrader;dunlop"),
2020-07-20 21:43:42 +00:00
txt: to.default.Render()
2020-07-16 07:54:32 +00:00
},
2020-07-20 21:43:42 +00:00
{k: new Tag("valves", "dunlop"), txt: to.dunlop.Render()},
{k: new Tag("valves", "sclaverand"), txt: to.sclaverand.Render()},
{k: new Tag("valves", "auto"), txt: to.auto.Render()},
2020-07-16 07:54:32 +00:00
],
freeform: {
2020-07-20 21:43:42 +00:00
extraTags: new Tag("fixme", "Freeform valves= tag used: possibly a wrong value"),
2020-07-16 07:54:32 +00:00
key: "valves",
2020-07-20 21:43:42 +00:00
template: to.template.txt,
renderTemplate: to.render.txt
2020-07-16 07:54:32 +00:00
}
});
}
}