import React from "react";
import PopupBehaviour, {
  PopupTargetBehaviour,
  PopupContentBehaviour
} from "./Popup.behaviour";
import PopupSkeleton, {
  PopupTargetSkeleton,
  PopupContentSkeleton
} from "./Popup.skeleton";
import componentGroups from "../../docs-utils/componentGroups";
import componentCategories from "../../docs-utils/componentCategories";

import popupPropTypes, {
  defaultProps,
  propsDescription,
  popupContentDefaultProps
} from "./Popup.propTypes";
import constantProps from "./Popup.constantProps";

export default function Popup(props) {
  return <PopupBehaviour {...props} renderComponent={PopupSkeleton} />;
}
export function PopupTarget(props) {
  return (
    <PopupTargetBehaviour {...props} renderComponent={PopupTargetSkeleton} />
  );
}
export function PopupContent(props) {
  return (
    <PopupContentBehaviour {...props} renderComponent={PopupContentSkeleton} />
  );
}
// Popup
Popup.propTypes = popupPropTypes;
Popup.defaultProps = defaultProps;
Popup.propsDescription = propsDescription;
Popup.constantProps = constantProps;
// PopupTarget
// PopupContent
PopupContent.defaultProps = popupContentDefaultProps;

if (__DOCS__) {
  Popup.docs = {
    componentGroup: componentGroups.Molecule,
    folderName: componentCategories.General
  };
}
