"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var AccountItem_stories_exports = {};
__export(AccountItem_stories_exports, {
  Default: () => Default,
  TestAccount: () => TestAccount,
  TestWithArrow: () => TestWithArrow,
  TestWithCheckbox: () => TestWithCheckbox,
  TestWithEdit: () => TestWithEdit,
  TestWithoutAddressIcon: () => TestWithoutAddressIcon,
  TestWithoutProtocol: () => TestWithoutProtocol,
  default: () => AccountItem_stories_default
});
module.exports = __toCommonJS(AccountItem_stories_exports);
var import_test = require("@storybook/test");
var import_AccountItem = require("./AccountItem");
const onClick = (0, import_test.fn)();
const meta = {
  component: import_AccountItem.AccountItem,
  title: "PreLdls/Components/AccountItem",
  tags: ["autodocs"],
  args: {
    onClick,
    account: {
      address: "n4A9323232Zgty",
      balance: "0.118 ETH",
      cryptoId: "bitcoin",
      fiatValue: "$5,969.83",
      id: "12345",
      name: "Main BTC",
      ticker: "btc"
    }
  }
};
var AccountItem_stories_default = meta;
const Default = {};
const TestAccount = {
  args: {
    onClick,
    account: {
      address: "n4A9323232Zgty",
      balance: "0.118 BTC",
      cryptoId: "bitcoin",
      fiatValue: "$5,969.83",
      id: "12345",
      name: "Main BTC",
      protocol: "Native Segwit",
      ticker: "btc"
    }
  },
  play: async ({ canvasElement }) => {
    const canvas = (0, import_test.within)(canvasElement);
    const name = canvas.getByText("Main BTC");
    const protocol = canvas.getByTestId("tag");
    const address = canvas.getByText("n4A93...2Zgty");
    const addressIcon = canvas.getByRole("img");
    const fiatValue = canvas.getByText("$5,969.83");
    const balance = canvas.getByText("0.118 BTC");
    await (0, import_test.expect)(name).toBeInTheDocument();
    await (0, import_test.expect)(protocol).toBeInTheDocument();
    await (0, import_test.expect)(protocol).toHaveTextContent("Native Segwit");
    await (0, import_test.expect)(address).toBeInTheDocument();
    await (0, import_test.expect)(addressIcon).toBeInTheDocument();
    await (0, import_test.expect)(fiatValue).toBeInTheDocument();
    await (0, import_test.expect)(balance).toBeInTheDocument();
  }
};
const TestWithoutProtocol = {
  args: {
    onClick,
    account: {
      address: "n4A9323232Zgty",
      balance: "0.118 BTC",
      cryptoId: "bitcoin",
      fiatValue: "$5,969.83",
      id: "21345",
      name: "Main BTC",
      ticker: "btc"
    }
  },
  play: async ({ canvasElement }) => {
    const canvas = (0, import_test.within)(canvasElement);
    const protocol = canvas.queryByTestId("tag");
    await (0, import_test.expect)(protocol).not.toBeInTheDocument();
  }
};
const TestWithoutAddressIcon = {
  args: {
    onClick,
    account: {
      address: "n4A9323232Zgty",
      balance: "0.118 BTC",
      fiatValue: "$5,969.83",
      id: "bitcoin",
      name: "Main BTC"
    },
    showIcon: false
  },
  play: async ({ canvasElement }) => {
    const canvas = (0, import_test.within)(canvasElement);
    const addressIcon = canvas.queryByRole("img");
    await (0, import_test.expect)(addressIcon).not.toBeInTheDocument();
  }
};
const TestWithCheckbox = {
  args: {
    account: {
      address: "n4A9323232Zgty",
      balance: "0.118",
      cryptoId: "bitcoin",
      fiatValue: "$5,969.83",
      id: "12345",
      name: "Main BTC",
      ticker: "btc"
    },
    onClick,
    rightElement: {
      type: "checkbox",
      checkbox: {
        isChecked: false,
        name: "checkbox",
        onChange: () => {
        }
      }
    }
  },
  play: async ({ canvasElement }) => {
    const canvas = (0, import_test.within)(canvasElement);
    const arrowIcon = canvas.getByTestId("right-element-checkbox");
    await (0, import_test.expect)(arrowIcon).toBeInTheDocument();
  }
};
const TestWithArrow = {
  args: {
    account: {
      address: "n4A9323232Zgty",
      cryptoId: "bitcoin",
      fiatValue: "$5,969.83",
      id: "12345",
      name: "Main BTC",
      ticker: "btc"
    },
    rightElement: {
      type: "arrow"
    }
  },
  play: async ({ canvasElement }) => {
    const canvas = (0, import_test.within)(canvasElement);
    const arrowIcon = canvas.getByTestId("right-element-arrow-icon");
    await (0, import_test.expect)(arrowIcon).toBeInTheDocument();
  }
};
const TestWithEdit = {
  args: {
    account: {
      address: "n4A9323232Zgty",
      cryptoId: "bitcoin",
      fiatValue: "$5,969.83",
      id: "12345",
      name: "Main BTC",
      ticker: "btc"
    },
    onClick: void 0,
    rightElement: {
      type: "edit",
      onClick
    }
  },
  play: async ({ canvasElement }) => {
    const canvas = (0, import_test.within)(canvasElement);
    const arrowIcon = canvas.getByTestId("right-element-edit-icon");
    await (0, import_test.expect)(arrowIcon).toBeInTheDocument();
  }
};
//# sourceMappingURL=AccountItem.stories.js.map
