/* Transparent keys used on more than one layer
 */

import { KeymapKey } from "@keymapkit/ui";
import {
  layer0LeftFingerMods,
  layer0LeftThumb,
  layer0RightFingerMods,
  layer0RightThumb,
} from "./layer0base";

export const transparentInfo = ["Same as the key on the Base layer"];

export const allBaseKeys: KeymapKey[] = [
  ...layer0LeftFingerMods,
  ...layer0LeftThumb,
  ...layer0RightFingerMods,
  ...layer0RightThumb,
];

export const transparentSelection = allBaseKeys.map((key) => key.id);

export const transparentLeftFingerMods: KeymapKey[] = layer0LeftFingerMods.map(
  (key) => {
    return { ...key, selection: transparentSelection, info: transparentInfo };
  },
);

export const transparentLeftThumbkeys: KeymapKey[] = layer0LeftThumb.map(
  (key) => {
    return { ...key, selection: transparentSelection, info: transparentInfo };
  },
);

export const transparentRightFingerMods: KeymapKey[] =
  layer0RightFingerMods.map((key) => {
    return { ...key, selection: transparentSelection, info: transparentInfo };
  });

export const transparentRightThumbkeys: KeymapKey[] = layer0RightThumb.map(
  (key) => {
    return { ...key, selection: transparentSelection, info: transparentInfo };
  },
);
