import type { AssetType } from '../core/model/AssetTypes'; import type { CentreTab } from './Editor'; /** Where an opened asset goes; a placeable one (sprite, camera, text, collider) has no tab of its own. */ export const TAB_OF_ASSET: Partial> = { scene: 'scene', behavior: 'graph', statemachine: 'statemachine', shader: 'shader', particles: 'particles', texture: 'texture', vectorart: 'vectorart', pixelart: 'pixelart', animation: 'animation', tile: 'tile', container: 'container', }; /** * Whether opening an asset of this type brings an editor up. Everything else is only selected, so a * menu entry that promises to open it is offered greyed out instead. */ export function hasAssetEditor(type: AssetType): boolean { return TAB_OF_ASSET[type] !== undefined; }