Catalog alignment
[sdc.git] / catalog-ui / src / app / ng2 / components / ui / panel-wrapper / panel-wrapper.component.ts
1 import {Component} from "@angular/core";
2 import {Select, Store} from "@ngxs/store";
3 import {Subscription} from "rxjs/Subscription";
4 import {GraphState} from "../../../pages/composition/common/store/graph.state";
5 import {OnSidebarOpenOrCloseAction} from "../../../pages/composition/common/store/graph.actions";
6
7 @Component({
8     selector: 'panel-wrapper-component',
9     templateUrl: './panel-wrapper.component.html',
10     styleUrls: ['./panel-wrapper.component.less']
11 })
12 export class PanelWrapperComponent {
13     @Select(GraphState.withSidebar) withSidebar$: boolean;
14
15     tabs: Array<any>;
16     subscription: Subscription;
17
18     constructor(public store: Store) {
19     }
20
21     private toggleSidebarDisplay = () => {
22         // this.withSidebar = !this.withSidebar;
23         this.store.dispatch(new OnSidebarOpenOrCloseAction());
24     }
25 }