import { Container } from '@cleartrip/ct-design-container';
import { makeStyles } from '@cleartrip/ct-design-style-manager';

import type { IDialogContentProps } from '../type';

/**
 * Static slot applied to the DialogContent root. Mirrors aldenui's
 * `theme.spacing[6]` padding + centered flex alignment so migrated
 * call sites render identically.
 */
const staticStyles = makeStyles((theme) => ({
  root: {
    padding: theme.spacing[6],
    justifyContent: 'center',
    alignItems: 'center',
  },
}));

/**
 * Native implementation of `DialogContent` — functionally identical
 * to the web variant. Kept as a separate file so platform-specific
 * tweaks (e.g. pressable wiring, measure calls) can diverge later
 * without touching web.
 */
const DialogContent = ({ headIcon, title, description, styleConfig }: IDialogContentProps) => {
  const { root: customStyles = [] } = styleConfig || {};

  return (
    <Container styleConfig={{ root: [staticStyles.root, ...customStyles] }}>
      {headIcon}
      {title}
      {description}
    </Container>
  );
};

DialogContent.displayName = 'DialogContent';

export default DialogContent;
