forked from DigiLive/mushroom-strategy
- Make use of the debug module. - Make use of the auxiliaries module. - Make use of the localization module. - Make use of the Registry module. - Align code across the chip modules. - Make configurations immutable. - Make use of the refactored types.
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
// noinspection JSUnusedGlobalSymbols Class is dynamically imported.
|
|
|
|
import { CustomHeaderCardConfig } from '../types/strategy/strategy-cards';
|
|
import { ViewConfig } from '../types/strategy/strategy-views';
|
|
import { localize } from '../utilities/localize';
|
|
import AbstractView from './AbstractView';
|
|
|
|
/**
|
|
* Scene View Class.
|
|
*
|
|
* sed to create a view configuration for entities of the scene domain.
|
|
*/
|
|
class SceneView extends AbstractView {
|
|
/** The domain of the entities that the view is representing. */
|
|
static readonly domain = 'scene' as const;
|
|
|
|
/** Returns the default configuration object for the view. */
|
|
static getDefaultConfig(): ViewConfig {
|
|
return {
|
|
title: localize('scene.scenes'),
|
|
path: 'scenes',
|
|
icon: 'mdi:palette',
|
|
subview: false,
|
|
headerCardConfiguration: {
|
|
showControls: false,
|
|
},
|
|
};
|
|
}
|
|
|
|
/** Returns the default configuration of the view's Header card. */
|
|
static getViewHeaderCardConfig(): CustomHeaderCardConfig {
|
|
return {};
|
|
}
|
|
|
|
/**
|
|
* Class constructor.
|
|
*
|
|
* @param {ViewConfig} [customConfiguration] Custom view configuration.
|
|
*/
|
|
constructor(customConfiguration?: ViewConfig) {
|
|
super();
|
|
|
|
this.initializeViewConfig(SceneView.getDefaultConfig(), customConfiguration, SceneView.getViewHeaderCardConfig());
|
|
}
|
|
}
|
|
|
|
export default SceneView;
|