"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.SearchLayout = SearchLayout;

var _RefreshButton = require("../RefreshButton");

var _userProfile = require("../UserProfile/user-profile");

var _jsxRuntime = require("react/jsx-runtime");

function SearchLayout(_ref) {
  var children = _ref.children,
      contentClass = _ref.contentClass,
      title = _ref.title,
      extra = _ref.extra,
      onRefresh = _ref.onRefresh;
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
    className: "flex flex-col flex-1",
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      className: "sticky top-0 z-10 flex-shrink-0 flex py-3 bg-white shadow",
      children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
        className: "px-4 flex flex-1 justify-between",
        children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
          className: "flex items-center",
          children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
            children: title
          })
        }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
          className: "ml-4 flex items-center md:ml-6",
          children: [onRefresh && /*#__PURE__*/(0, _jsxRuntime.jsx)(_RefreshButton.RefreshButton, {
            onClick: onRefresh
          }), extra, /*#__PURE__*/(0, _jsxRuntime.jsx)(_userProfile.UserProfile, {})]
        })]
      })
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)("main", {
      className: "overflow-y-auto",
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: contentClass || "p-6",
        children: children
      })
    })]
  });
}