import { SidePanel, SidePanelProps } from '@wix/design-system';
import React from 'react';
import { useSidePanelProps } from '../../hooks/layout/useSidePanelProps';

export interface PatternsSidePanelProps
  extends Omit<
    SidePanelProps,
    | 'closeButtonProps'
    | 'onCloseButtonClick'
    | 'backButtonProps'
    | 'onBackButtonClick'
  > {
  onClose?: () => void;
}

export function PatternsSidePanel(props: PatternsSidePanelProps) {
  const { onClose, ...rest } = props;
  const sidePanelProps = useSidePanelProps({
    onClose,
  });
  return <SidePanel {...sidePanelProps} {...rest} />;
}
