import React, {Fragment} from 'react';
import View3d from './View3d';
import ls from './AppTabs.less';
import TabSwitcher, {Tab} from 'ui/components/TabSwticher';
import connect from 'ui/connectLegacy';
import {TOKENS as APP_TABS_TOKENS} from "../appTabsPlugin";
import Card from "ui/components/Card";
function AppTabs({activeTab, tabs, switchTo, close, detach}) {
return
{tabs.map(({id, url}, index) =>
)}
{tabs.map(({label, id}, index) => {
const bind = func => e => {
func(index);
e.stopPropagation();
};
return
})}
}
export default connect(AppTabs, APP_TABS_TOKENS.TABS, {
mapActions: ({dispatch, updateState}) => ({
switchTo: index => updateState(APP_TABS_TOKENS.TABS, ({tabs}) => ({tabs, activeTab: index})),
close: index => updateState(APP_TABS_TOKENS.TABS, ({activeTab, tabs}) => {
tabs.splice(index, 1);
return {
activeTab: (activeTab === index ? -1 : activeTab),
tabs
};
}),
detach: index => dispatch(APP_TABS_TOKENS.DETACH, index)
})
});
export function FrameView({url}) {
return
}