"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _components = require("@wordpress/components");
var _libraryFontVariant = _interopRequireDefault(require("./library-font-variant"));
var _sortFontFaces = require("./utils/sort-font-faces");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

function LibraryFontDetails({
  font
}) {
  const fontFaces = font.fontFace && font.fontFace.length ? (0, _sortFontFaces.sortFontFaces)(font.fontFace) : [{
    fontFamily: font.fontFamily,
    fontStyle: 'normal',
    fontWeight: '400'
  }];
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalSpacer, {
      margin: 4
    }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
      spacing: 0,
      children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalSpacer, {
        margin: 8
      }), fontFaces.map((face, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_libraryFontVariant.default, {
        font: font,
        face: face
      }, `face${i}`))]
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalSpacer, {
      margin: 8
    })]
  });
}
var _default = exports.default = LibraryFontDetails;
//# sourceMappingURL=library-font-details.js.map