"use strict";

import { Alert } from "react-native";
import { render } from "@testing-library/react-native";
import { renderWithExperimentalEnabledContextProvider } from "../../../utils/testing";
import { ListItemAction } from "../ListItemAction";
import { ListItemInfo } from "../ListItemInfo";
import { ListItemInfoCopy } from "../ListItemInfoCopy";
import { ListItemNav } from "../ListItemNav";
import { ListItemNavAlert } from "../ListItemNavAlert";
import { ListItemRadioWithAmount } from "../ListItemRadioWithAmount";
import { ListItemTransaction } from "../ListItemTransaction";
import { PressableListItemBase } from "../PressableListItemBase";
import { jsx as _jsx } from "react/jsx-runtime";
const onButtonPress = () => {
  Alert.alert("Alert", "Action triggered");
};
describe("Test List Item Components", () => {
  it("ListItemInfo Snapshot", () => {
    const {
      toJSON
    } = render(/*#__PURE__*/_jsx(ListItemInfo, {
      label: "label",
      value: "testValue",
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemInfoCopy Snapshot", () => {
    const {
      toJSON
    } = render(/*#__PURE__*/_jsx(ListItemInfoCopy, {
      label: "label",
      value: "testValue",
      onPress: onButtonPress,
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemNav Snapshot", () => {
    const {
      toJSON
    } = render(/*#__PURE__*/_jsx(ListItemNav, {
      value: "testValue",
      onPress: onButtonPress,
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemNavAlert Snapshot", () => {
    const {
      toJSON
    } = render(/*#__PURE__*/_jsx(ListItemNavAlert, {
      value: "testValue",
      onPress: onButtonPress,
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemAction Snapshot", () => {
    const {
      toJSON
    } = render(/*#__PURE__*/_jsx(ListItemAction, {
      label: "label",
      variant: "primary",
      onPress: onButtonPress,
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemTransaction Snapshot", () => {
    const {
      toJSON
    } = render(/*#__PURE__*/_jsx(ListItemTransaction, {
      title: "TITLE",
      subtitle: "subtitle",
      transaction: {
        amount: "€ 1.000,00",
        amountAccessibilityLabel: "€ 1.000,00"
      },
      isLoading: true,
      onPress: onButtonPress
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("PressableListItemsBase Snapshot", () => {
    const {
      toJSON
    } = render(/*#__PURE__*/_jsx(PressableListItemBase, {}));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemRadioWithAmount Snapshot", () => {
    const {
      toJSON: toJSONSuggested
    } = render(/*#__PURE__*/_jsx(ListItemRadioWithAmount, {
      formattedAmountString: "\u20AC 1.000,00",
      label: "label",
      suggestReason: "suggestReason",
      isSuggested: true,
      selected: true
    }));
    const {
      toJSON: toJSONNotSuggested
    } = render(/*#__PURE__*/_jsx(ListItemRadioWithAmount, {
      formattedAmountString: "\u20AC 1.000,00",
      label: "label",
      isSuggested: false
    }));
    expect(toJSONSuggested()).toMatchSnapshot();
    expect(toJSONNotSuggested()).toMatchSnapshot();
  });
});
describe("Test List Item Components - Experimental Enabled ", () => {
  it("ListItemInfo Snapshot", () => {
    const {
      toJSON
    } = renderWithExperimentalEnabledContextProvider(/*#__PURE__*/_jsx(ListItemInfo, {
      label: "label",
      value: "testValue",
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemInfoCopy Snapshot", () => {
    const {
      toJSON
    } = renderWithExperimentalEnabledContextProvider(/*#__PURE__*/_jsx(ListItemInfoCopy, {
      label: "label",
      value: "testValue",
      onPress: onButtonPress,
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemNav Snapshot", () => {
    const {
      toJSON
    } = renderWithExperimentalEnabledContextProvider(/*#__PURE__*/_jsx(ListItemNav, {
      value: "testValue",
      onPress: onButtonPress,
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemNavAlert Snapshot", () => {
    const {
      toJSON
    } = renderWithExperimentalEnabledContextProvider(/*#__PURE__*/_jsx(ListItemNavAlert, {
      value: "testValue",
      onPress: onButtonPress,
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemAction Snapshot", () => {
    const {
      toJSON
    } = renderWithExperimentalEnabledContextProvider(/*#__PURE__*/_jsx(ListItemAction, {
      label: "label",
      variant: "primary",
      onPress: onButtonPress,
      accessibilityLabel: "accessibilityLabel"
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemTransaction Snapshot", () => {
    const {
      toJSON
    } = renderWithExperimentalEnabledContextProvider(/*#__PURE__*/_jsx(ListItemTransaction, {
      title: "TITLE",
      subtitle: "subtitle",
      transaction: {
        amount: "€ 1.000,00",
        amountAccessibilityLabel: "€ 1.000,00"
      },
      isLoading: true,
      onPress: onButtonPress
    }));
    expect(toJSON()).toMatchSnapshot();
  });
  it("PressableListItemsBase Snapshot", () => {
    const {
      toJSON
    } = renderWithExperimentalEnabledContextProvider(/*#__PURE__*/_jsx(PressableListItemBase, {}));
    expect(toJSON()).toMatchSnapshot();
  });
  it("ListItemRadioWithAmount Snapshot", () => {
    const {
      toJSON: toJSONSuggested
    } = renderWithExperimentalEnabledContextProvider(/*#__PURE__*/_jsx(ListItemRadioWithAmount, {
      formattedAmountString: "\u20AC 1.000,00",
      label: "label",
      suggestReason: "suggestReason",
      isSuggested: true,
      selected: true
    }));
    const {
      toJSON: toJSONNotSuggested
    } = renderWithExperimentalEnabledContextProvider(/*#__PURE__*/_jsx(ListItemRadioWithAmount, {
      formattedAmountString: "\u20AC 1.000,00",
      label: "label",
      isSuggested: false
    }));
    expect(toJSONSuggested()).toMatchSnapshot();
    expect(toJSONNotSuggested()).toMatchSnapshot();
  });
});
//# sourceMappingURL=listitem.test.js.map