import React from "react";
import CssFlex from "../../../../../ui/CssFlex";
import TextSectionHeader from "./TextSectionHeader";
import TextSectionBody from "./TextSectionBody";
var TextSection = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var type = props.type,
      translations = props.translations,
      items = props.items,
      maxItems = props.maxItems,
      maxLength = props.maxLength,
      minItems = props.minItems,
      isLoading = props.isLoading,
      onSelectAssets = props.onSelectAssets,
      warning = props.warning,
      pressed = props.pressed,
      assets = props.assets;
  var texts = items.slice().reverse();
  return /*#__PURE__*/React.createElement(CssFlex, {
    ref: ref,
    direction: "column",
    gap: "md",
    width: "-webkit-fill-available"
  }, /*#__PURE__*/React.createElement(TextSectionHeader, {
    translations: translations,
    warning: warning,
    pressed: pressed
  }), /*#__PURE__*/React.createElement(TextSectionBody, {
    isLoading: isLoading,
    type: type,
    warning: warning,
    pressed: pressed,
    translations: translations,
    items: texts,
    maxLength: maxLength,
    onSelectAssets: onSelectAssets,
    assets: assets.filter(function (asset) {
      return !texts.includes(asset.text);
    }),
    minItems: minItems,
    maxItems: maxItems
  }));
});
export default TextSection;