import { CollapsableControls, CollapsableState, PluginUIComponent } from 'molstar/lib/mol-plugin-ui/base'; import { Button } from 'molstar/lib/mol-plugin-ui/controls/common'; import { GetAppSvg } from 'molstar/lib/mol-plugin-ui/controls/icons'; import { encodeStructureData, downloadAsZipFile } from '../helpers/export'; export class ExportControls extends CollapsableControls { protected defaultState(): CollapsableState { return { header: 'Export', isCollapsed: true, brand: { accent: 'gray' as const, svg: ExportOutlinedSvg } }; } componentDidMount() { this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, sel => { this.setState({ isHidden: sel.structures.length === 0 }); }); } protected renderControls(): JSX.Element | null { return