import React from 'react';
import PropTypes from 'prop-types';
import './PopupWindow.scss';
import Text from '../../atoms/text/Text';
import IconButton from '../../atoms/button/IconButton';
import { MenuItem } from '../../atoms/context-menu/ContextMenu';
import Header, { TitleWrapper } from '../../atoms/header/Header';
import ScrollView from '../../atoms/scroll/ScrollView';
import RawModal from '../../atoms/modal/RawModal';
import ChevronLeftIC from '../../../../public/res/ic/outlined/chevron-left.svg';
function PWContentSelector({
selected, variant, iconSrc,
type, onClick, children,
}) {
const pwcsClass = selected ? ' pw-content-selector--selected' : '';
return (
);
}
PWContentSelector.defaultProps = {
selected: false,
variant: 'surface',
iconSrc: 'none',
type: 'button',
};
PWContentSelector.propTypes = {
selected: PropTypes.bool,
variant: PropTypes.oneOf(['surface', 'caution', 'danger']),
iconSrc: PropTypes.string,
type: PropTypes.oneOf(['button', 'submit']),
onClick: PropTypes.func.isRequired,
children: PropTypes.string.isRequired,
};
function PopupWindow({
className, isOpen, title, contentTitle,
drawer, drawerOptions, contentOptions,
onRequestClose, children,
}) {
const haveDrawer = drawer !== null;
return (
{haveDrawer && (
)}
{contentTitle !== null ? contentTitle : title}
{contentOptions}
);
}
PopupWindow.defaultProps = {
className: null,
drawer: null,
contentTitle: null,
drawerOptions: null,
contentOptions: null,
onRequestClose: null,
};
PopupWindow.propTypes = {
className: PropTypes.string,
isOpen: PropTypes.bool.isRequired,
title: PropTypes.string.isRequired,
contentTitle: PropTypes.string,
drawer: PropTypes.node,
drawerOptions: PropTypes.node,
contentOptions: PropTypes.node,
onRequestClose: PropTypes.func,
children: PropTypes.node.isRequired,
};
export { PopupWindow as default, PWContentSelector };