'use strict';
import { jsxs, jsx } from 'react/jsx-runtime';
import { Avatar, AvatarImage, AvatarFallback } from '../../../fd-component-toolbox/avatar/Avatar.js';
import { Button } from '../../../fd-component-toolbox/button/Button.js';
import { Icon, iconSizes, iconNames } from '../../../fd-component-toolbox/icon/Icon.js';
import { first } from '../../../../fd-toolbox/server/collections/single-funcs.js';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
  value,
  configurable: true
});
function FeedHeader({
  authorName,
  timestamp,
  avatarUrl
}) {
  return /* @__PURE__ */jsxs("div", {
    className: "flex items-start justify-between p-3 sm:p-4",
    children: [/* @__PURE__ */jsxs("div", {
      className: "flex gap-2 sm:gap-3",
      children: [/* @__PURE__ */jsxs(Avatar, {
        className: "size-8 sm:size-10",
        children: [/* @__PURE__ */jsx(AvatarImage, {
          src: avatarUrl,
          alt: authorName
        }), /* @__PURE__ */jsx(AvatarFallback, {
          children: first(Array.from(authorName))
        })]
      }), /* @__PURE__ */jsxs("div", {
        children: [/* @__PURE__ */jsx("h3", {
          className: "text-foreground text-sm font-semibold sm:text-base",
          children: authorName
        }), /* @__PURE__ */jsx("div", {
          className: "text-muted-foreground flex items-center gap-1 text-xs sm:text-sm",
          children: /* @__PURE__ */jsx("span", {
            children: timestamp
          })
        })]
      })]
    }), /* @__PURE__ */jsx(Button, {
      variant: "fullRounded",
      children: /* @__PURE__ */jsx(Icon, {
        name: iconNames.dotsHorizontal,
        size: iconSizes.large
      })
    })]
  });
}
__name(FeedHeader, "FeedHeader");

export { FeedHeader };
