import { Dialog as TDialog, View, XStack, createStyledContext, styled, withStaticProperties } from "tamagui";
import { WINDOW_HEIGHT, WINDOW_WIDTH } from "./dimensions.native.js";
import { Body, Headline as _Headline } from "./typography.native.js";
var DialogContext = createStyledContext({
    fullscreen: !1
  }),
  DialogFrame = styled(TDialog, {
    name: "Dialog",
    context: DialogContext
  }),
  Content = styled(TDialog.Content, {
    name: "DialogContainer",
    context: DialogContext,
    backgroundColor: "$surfaceContainerLowest",
    borderRadius: "$shape.corner_xl",
    padding: 24,
    minWidth: 280,
    maxWidth: 560,
    elevate: !0,
    key: "content",
    overflow: "hidden",
    animateOnly: ["transform", "opacity"],
    $compact: {
      mx: 20,
      backgroundColor: "$surfaceContainerLowest"
    },
    animation: ["quick", {
      o: {
        overshootClamping: !0
      }
    }],
    enterStyle: {
      x: 0,
      y: -20,
      opacity: 0,
      scale: 0.9
    },
    exitStyle: {
      x: 0,
      y: 10,
      opacity: 0,
      scale: 0.95
    },
    variants: {
      fullscreen: {
        true: {
          minWidth: WINDOW_WIDTH,
          maxWidth: WINDOW_WIDTH,
          width: WINDOW_WIDTH,
          minHeight: WINDOW_HEIGHT,
          maxHeight: WINDOW_HEIGHT,
          height: WINDOW_HEIGHT,
          borderRadius: 0,
          display: "flex",
          justifyContent: "center",
          flexDirection: "row",
          padding: 0
        },
        false: {}
      }
    },
    defaultVariants: {
      fullscreen: !1
    }
  }),
  Headline = styled(_Headline, {
    name: "DialogHeadline",
    context: DialogContext,
    size: "small"
  }),
  Title = styled(TDialog.Title, {
    context: DialogContext,
    name: "DialogTitle",
    mb: 16
  }),
  SupportingText = styled(Body, {
    size: "medium",
    mb: 24
  }),
  Overlay = styled(TDialog.Overlay, {
    context: DialogContext,
    name: "DialogOverlay",
    backgroundColor: "$scrim",
    key: "overlay",
    // animation: 'slow',
    opacity: 0.6,
    enterStyle: {
      opacity: 0
    },
    exitStyle: {
      opacity: 0
    }
  }),
  Actions = styled(XStack, {
    name: "DialogActions",
    width: "100%",
    justifyContent: "flex-end",
    marginTop: 24,
    gap: 8
  }),
  Header = styled(View, {
    name: "DialogHeader",
    mb: 16
  }),
  Dialog = withStaticProperties(DialogFrame, {
    Props: DialogContext.Provider,
    Content,
    Headline,
    SupportingText,
    Trigger: TDialog.Trigger,
    Portal: TDialog.Portal,
    Overlay,
    Actions,
    Header,
    Close: TDialog.Close,
    Title
  });
export { Dialog };
//# sourceMappingURL=Dialog.native.js.map
