import type {INativeTagMap} from '../common/GenericTagTypes.js';
import { CaseInsensitiveTagMap } from '../common/CaseInsensitiveTagMap.js';

/**
 * EBML Tag map
 */
const ebmlTagMap: INativeTagMap = {
  'segment:title': 'title',
  'album:ARTIST': 'albumartist',
  'album:ARTISTSORT': 'albumartistsort',
  'album:TITLE': 'album',
  'album:DATE_RECORDED': 'originaldate',
  'album:DATE_RELEASED': 'releasedate',
  'album:PART_NUMBER': 'disk',
  'album:TOTAL_PARTS': 'totaltracks',
  'track:ARTIST': 'artist',
  'track:ARTISTSORT': 'artistsort',
  'track:TITLE': 'title',
  'track:PART_NUMBER': 'track',
  'track:MUSICBRAINZ_TRACKID': 'musicbrainz_recordingid',
  'track:MUSICBRAINZ_ALBUMID': 'musicbrainz_albumid',
  'track:MUSICBRAINZ_ARTISTID': 'musicbrainz_artistid',
  'track:PUBLISHER': 'label',
  'track:GENRE': 'genre',
  'track:ENCODER': 'encodedby',
  'track:ENCODER_OPTIONS': 'encodersettings',
  'edition:TOTAL_PARTS': 'totaldiscs',
  picture: 'picture'
};

export class MatroskaTagMapper extends CaseInsensitiveTagMap {

  public constructor() {
    super(['matroska'], ebmlTagMap);
  }

}
