import React from 'react';
import { kit, SdmProvider } from '@ray-js/panel-sdk';
import 'ray';
import '@/i18n';
import composeLayout from './composeLayout';
// import {  } from '@ray-js/sdm-react';
import { devices } from '@/devices';
// import { ProductName } from '@/constants';

const { initPanelEnvironment } = kit;

interface Props {
  children: React.ReactNode;
}

initPanelEnvironment({ useDefaultOffline: true });

class App extends React.Component<Props> {
  componentDidMount() {
    console.info('app did mount ');
  }

  onLaunch(e) {
    console.info(e, '=== App onLaunch');
  }

  render() {
    return <SdmProvider value={devices.fan}>{this.props.children}</SdmProvider>;
  }
}

export default App;
