import type { FunctionalComponent } from 'preact';
import { createLazyComponent } from '../../core/createLazyComponent';
import type { ProductParameterControlsProps } from './ProductParameterControls';

const LoadedProductParameterControls = createLazyComponent<ProductParameterControlsProps, typeof import('./ProductParameterControls')>(
  () => import('./ProductParameterControls'),
  (module) => module.ProductParameterControls,
);

export const LazyProductParameterControls: FunctionalComponent<ProductParameterControlsProps> = (props) => (
  <LoadedProductParameterControls {...props} />
);
