import React from "react";
import { render } from "@testing-library/react-native";
import Stack, { HStack, VStack, ZStack } from "./stack";
import { ThemeProvider } from "../../../theme/src/theme-context";
import Divider from "../divider/divider";
import Box from "../box/box";
jest.useFakeTimers();
describe("Atoms/Stack", () => {
  it("passes the snapshot test for horizontal direction", () => {
    const tree = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Stack, {
      direction: "horizontal",
      spacing: "l",
      divider: /*#__PURE__*/React.createElement(Divider, null)
    }, /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 100,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    })))).toJSON();
    expect(tree).toMatchSnapshot();
  });
  it("passes the snapshot test for vertical direction", () => {
    const tree = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Stack, {
      mt: "l",
      direction: "vertical",
      spacing: "l",
      divider: /*#__PURE__*/React.createElement(Divider, null)
    }, /*#__PURE__*/React.createElement(Box, {
      w: 100,
      h: 20,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: "40%",
      h: 20,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    })))).toJSON();
    expect(tree).toMatchSnapshot();
  });
});
describe("Atoms/HStack", () => {
  it("passes the snapshot test", () => {
    const tree = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(HStack, {
      spacing: "l",
      divider: /*#__PURE__*/React.createElement(Divider, null)
    }, /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 100,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    })))).toJSON();
    expect(tree).toMatchSnapshot();
  });
});
describe("Atoms/VStack", () => {
  it("passes the snapshot test", () => {
    const tree = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(VStack, {
      spacing: "l",
      divider: /*#__PURE__*/React.createElement(Divider, null)
    }, /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 100,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "primary.500"
    })))).toJSON();
    expect(tree).toMatchSnapshot();
  });
});
describe("Atoms/ZStack", () => {
  it("passes the snapshot test", () => {
    const tree = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(ZStack, null, /*#__PURE__*/React.createElement(Box, {
      w: 100,
      h: 100,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 50,
      h: 50,
      backgroundColor: "neutral.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "danger.500"
    })), /*#__PURE__*/React.createElement(ZStack, {
      mt: "8",
      reversed: true
    }, /*#__PURE__*/React.createElement(Box, {
      w: 100,
      h: 100,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 50,
      h: 50,
      backgroundColor: "neutral.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "danger.500"
    })), /*#__PURE__*/React.createElement(ZStack, {
      mt: "8"
    }, /*#__PURE__*/React.createElement(Box, {
      w: 100,
      h: 100,
      backgroundColor: "primary.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 50,
      h: 50,
      zIndex: "docked",
      backgroundColor: "neutral.500"
    }), /*#__PURE__*/React.createElement(Box, {
      w: 20,
      h: 20,
      backgroundColor: "danger.500"
    })))).toJSON();
    expect(tree).toMatchSnapshot();
  });
});
//# sourceMappingURL=stack.spec.js.map