diff --git a/src/lib/osm/tags.test.ts b/src/lib/osm/tags.test.ts new file mode 100644 index 0000000..6a54167 --- /dev/null +++ b/src/lib/osm/tags.test.ts @@ -0,0 +1,11 @@ +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { getTagStatus } from './tags'; + +describe('The getTagStatus function', () => { + it('should return false/false for a tag that does NOT exist', () => { + expect(getTagStatus('whatever', {}, '', '')).toEqual({ + selected: false, + highlighted: false, + }); + }); +}); diff --git a/src/lib/osm/tags.ts b/src/lib/osm/tags.ts new file mode 100644 index 0000000..9d35719 --- /dev/null +++ b/src/lib/osm/tags.ts @@ -0,0 +1,31 @@ +interface TagStatus { + selected: boolean; + highlighted: boolean; +} + +interface TagFormatDefinition {} + +interface TagCategoryDefinitions { + [key: string]: TagFormatDefinition; +} + +interface TagActivityDefinitions { + [key: string]: TagCategoryDefinitions; +} + +interface TagDefinitions { + [key: string]: TagActivityDefinitions; +} + +export const getTagStatus = ( + tag: string, + definitions: TagDefinitions, + selectedKey: string, + highlightedKey: string +) => { + let status: TagStatus = { + selected: false, + highlighted: false, + }; + return status; +};