var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/plus/pisellFinancialSummary/PisellFinancialSummary.stories.tsx
var PisellFinancialSummary_stories_exports = {};
__export(PisellFinancialSummary_stories_exports, {
  BalanceDueOnly: () => BalanceDueOnly,
  Default: () => Default,
  Figma14256_4201_FullSummary: () => Figma14256_4201_FullSummary,
  FigmaDesign: () => FigmaDesign,
  FullExample: () => FullExample,
  HideZeroAmountRows: () => HideZeroAmountRows,
  MissingBalanceDue: () => MissingBalanceDue,
  NoPaidNoRefund: () => NoPaidNoRefund,
  TitleOverride: () => TitleOverride,
  WithRefund: () => WithRefund,
  default: () => PisellFinancialSummary_stories_default
});
module.exports = __toCommonJS(PisellFinancialSummary_stories_exports);
var import_react = __toESM(require("react"));
var import_PisellFinancialSummary = require("./PisellFinancialSummary");
var import_index = require("./index");
var import_utils = require("@pisell/utils");
if (typeof import_utils.locales.init === "function") {
  try {
    import_utils.locales.init(import_index.financialSummaryLocales, "zh-CN");
  } catch (_) {
  }
}
var defaultData = {
  balanceDue: 54,
  total: {
    value: 54,
    children: [
      { label: "Subtotal", value: 60.2, itemsCount: "3 items" },
      { label: "GST/Tax", value: 1, infoTooltip: "Tax tooltip" },
      { label: "Delivery Fee", value: 3 },
      { label: "Holiday surcharge", value: 3 },
      { label: "Discount", value: -5 }
    ]
  },
  paid: [{ methodName: "Card", amount: 54, time: "14:00" }],
  refund: []
};
var meta = {
  title: "Plus Components/PisellFinancialSummary",
  component: import_PisellFinancialSummary.PisellFinancialSummary,
  tags: ["autodocs"],
  parameters: {
    layout: "padded",
    backgrounds: {
      default: "gray",
      values: [
        { name: "gray", value: "#f5f5f5" },
        { name: "white", value: "#ffffff" }
      ]
    },
    docs: {
      description: {
        component: "资金汇总组件：展示 Balance Due、Total、Paid、Refund 层级结构，基于 PisellHierarchicalSummaryList。适用于订单详情、销售记录、购物车结算等场景。"
      }
    }
  },
  decorators: [
    (Story) => /* @__PURE__ */ import_react.default.createElement("div", { style: { background: "#f5f5f5", minHeight: "100%", padding: 24 } }, /* @__PURE__ */ import_react.default.createElement(Story, null))
  ],
  argTypes: {
    data: { description: "资金汇总数据" },
    showTotal: { control: "boolean", description: "是否显示 Total 区块" },
    showPaid: { control: "boolean", description: "是否显示 Paid 区块" },
    showRefund: { control: "boolean", description: "是否显示 Refund 区块" },
    currencySymbol: { control: "text", description: "货币符号" },
    amountPrecision: { control: "number", description: "金额小数位" },
    hideZeroAmountRows: {
      control: "boolean",
      description: "是否隐藏 0 金额行"
    }
  }
};
var PisellFinancialSummary_stories_default = meta;
var fullExampleData = {
  balanceDue: 130,
  total: {
    value: 54,
    children: [
      { label: "Subtotal", value: 60.2, itemsCount: "3 items" },
      { label: "GST/Tax", value: 1, infoTooltip: "Tax tooltip" },
      { label: "Delivery Fee/运费", value: 3 },
      {
        label: "Surcharges",
        value: 3,
        itemsCount: "2 items",
        children: [
          { label: "Holiday surcharge/节假日附加费", value: 1 },
          { label: "自定义其他附加费用", value: 2 }
        ]
      },
      {
        label: "Discount",
        value: -9,
        itemsCount: "3 items",
        children: [
          { label: "积分抵扣", value: -3 },
          { label: "会员抵扣", value: -3 },
          {
            label: "商品折扣",
            value: -3,
            children: [
              { label: "两件10元", value: -1 },
              { label: "活动标题", value: -2 }
            ]
          }
        ]
      }
    ]
  },
  paid: [
    {
      key: "paid-1",
      methodName: "Visa (12****1234)",
      time: "20:00",
      date: "30/08/2025",
      customer: "Customer",
      channel: "Online Store",
      amount: -30,
      bodyRows: [
        {
          label: "Visa (12****1234)",
          amount: "-$30",
          action: { label: "Void", onClick: () => {
          } }
        }
      ]
    },
    {
      key: "paid-2",
      methodName: "Card",
      time: "20:00",
      date: "28/08/2025",
      customer: "Staff: Jenny",
      channel: "Terminal 1100",
      amount: -50,
      bodyRows: [
        { label: "Card（Code: 6a****533d）", amount: "-$20", action: { label: "Void", onClick: () => {
        } } },
        { label: "Card（Code: 4a****133d）", amount: "-$10", action: { label: "Void", onClick: () => {
        } } }
      ]
    }
  ],
  refund: [
    {
      key: "refund-1",
      label: "Order cancelled",
      amount: 20,
      time: "15:00",
      date: "29/08/2025",
      customer: "Staff",
      channel: "Counter",
      bodyRows: [
        { label: "Order cancelled", amount: "$20", action: { label: "View", onClick: () => {
        } } }
      ]
    }
  ]
};
var FullExample = {
  name: "最全示例",
  parameters: {
    docs: {
      description: {
        story: "一级标题总价（应付余额）、二级标题费用合计 / 付款历史 / 退款；费用合计展开为多行明细，付款历史与退款展开为 Collapse 列表。"
      }
    },
    backgrounds: { default: "white", values: [{ name: "white", value: "#ffffff" }] }
  },
  decorators: [
    (Story) => /* @__PURE__ */ import_react.default.createElement("div", { style: { background: "#fff", padding: 24, maxWidth: 560, margin: "0 auto" } }, /* @__PURE__ */ import_react.default.createElement(Story, null))
  ],
  args: {
    data: fullExampleData,
    currencySymbol: "$",
    amountPrecision: 2,
    defaultExpandedLevel: 4,
    titleBalanceDue: "应付余额",
    titleTotal: "费用合计",
    titlePaid: "付款历史",
    titleRefund: "退款"
  }
};
var Default = {
  args: {
    data: defaultData,
    currencySymbol: "A$"
  }
};
var WithRefund = {
  args: {
    data: {
      ...defaultData,
      refund: [{ label: "Order cancelled", amount: 10, time: "15:00" }]
    },
    currencySymbol: "A$"
  }
};
var BalanceDueOnly = {
  args: {
    data: { balanceDue: 100 },
    currencySymbol: "$"
  }
};
var MissingBalanceDue = {
  args: {
    data: { ...defaultData, balanceDue: null },
    missingValuePlaceholder: "—",
    currencySymbol: "A$"
  }
};
var HideZeroAmountRows = {
  args: {
    data: {
      balanceDue: 50,
      total: {
        value: 50,
        children: [
          { label: "Subtotal", value: 50 },
          { label: "Discount", value: 0 },
          { label: "Fee", value: 0 }
        ]
      }
    },
    hideZeroAmountRows: true,
    currencySymbol: "$"
  }
};
var TitleOverride = {
  args: {
    data: defaultData,
    titleBalanceDue: "应付金额",
    titleTotal: "费用合计",
    titlePaid: "已付",
    titleRefund: "退款",
    currencySymbol: "¥"
  }
};
var NoPaidNoRefund = {
  args: {
    data: {
      balanceDue: 54,
      total: defaultData.total
    },
    currencySymbol: "A$"
  }
};
var FigmaDesign = {
  name: "Figma 14256-4201（设计稿 1:1）",
  parameters: {
    docs: {
      description: {
        story: "与 [Figma 设计稿 node 14256-4201](https://www.figma.com/design/pM8Ho6d7kCMv9vIBvFHUlj/Pisell-2.0-Component-Library?node-id=14256-4201&m=dev) 完全一致的展示，白底、展开 Total/Paid 明细，便于视觉对比。"
      }
    },
    backgrounds: {
      default: "white",
      values: [{ name: "white", value: "#ffffff" }]
    }
  },
  decorators: [
    (Story) => /* @__PURE__ */ import_react.default.createElement(
      "div",
      {
        style: {
          background: "#ffffff",
          padding: 0,
          maxWidth: 400,
          minHeight: 320,
          margin: "0 auto"
        }
      },
      /* @__PURE__ */ import_react.default.createElement(Story, null)
    )
  ],
  args: {
    data: {
      balanceDue: 54,
      total: {
        value: 54,
        children: [
          { label: "Subtotal", value: 60.2, itemsCount: "3 items" },
          { label: "GST/Tax", value: 1, infoTooltip: "Tax tooltip" },
          { label: "Delivery Fee", value: 3 },
          { label: "Holiday surcharge", value: 3 },
          { label: "Discount", value: -5 }
        ]
      },
      paid: [{ methodName: "Card", amount: 54, time: "14:00" }],
      refund: []
    },
    currencySymbol: "A$",
    amountPrecision: 2,
    defaultExpandedLevel: 2
  }
};
var Figma14256_4201_FullSummary = {
  name: "Figma 14256-4201 完整总结",
  parameters: {
    docs: {
      description: {
        story: "[Figma 14256:4201](https://www.figma.com/design/pM8Ho6d7kCMv9vIBvFHUlj/Pisell-2.0-Component-Library?node-id=14256-4201&m=dev) 结构：一级标题为总价（应付余额），二级标题为费用合计、付款历史、退款；同一列表展开可见 Subtotal/GST/支付记录等明细。"
      }
    },
    backgrounds: {
      default: "white",
      values: [{ name: "white", value: "#ffffff" }]
    }
  },
  decorators: [
    (Story) => /* @__PURE__ */ import_react.default.createElement(
      "div",
      {
        style: {
          background: "#ffffff",
          padding: 0,
          maxWidth: 600,
          margin: "0 auto"
        }
      },
      /* @__PURE__ */ import_react.default.createElement(Story, null)
    )
  ],
  args: {
    data: {
      balanceDue: 130,
      total: {
        value: 54,
        children: [
          { label: "Subtotal", value: 60.2, itemsCount: "3 items" },
          { label: "GST/Tax", value: 1, infoTooltip: "Tax tooltip" },
          { label: "Delivery Fee/运费", value: 3 },
          {
            label: "Surcharges",
            value: 3,
            itemsCount: "2 items",
            children: [
              { label: "Holiday surcharge/节假日附加费", value: 1 },
              { label: "自定义其他附加费用", value: 2 }
            ]
          },
          {
            label: "Discount",
            value: -9,
            itemsCount: "3 items",
            children: [
              { label: "积分抵扣", value: -3 },
              { label: "会员抵扣", value: -3 },
              {
                label: "商品折扣",
                value: -3,
                children: [
                  { label: "两件10元", value: -1 },
                  { label: "活动标题", value: -2 }
                ]
              }
            ]
          }
        ]
      },
      paid: [
        {
          key: "paid-1",
          methodName: "Visa (12****1234)",
          time: "20:00",
          date: "30/08/2025",
          customer: "Customer",
          channel: "Online Store",
          amount: -30
        },
        {
          key: "paid-2",
          methodName: "Card",
          time: "20:00",
          date: "28/08/2025",
          customer: "Staff: Jenny",
          channel: "Terminal 1100",
          amount: -50
        }
      ],
      refund: []
    },
    currencySymbol: "$",
    amountPrecision: 2,
    defaultExpandedLevel: 3
  }
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  BalanceDueOnly,
  Default,
  Figma14256_4201_FullSummary,
  FigmaDesign,
  FullExample,
  HideZeroAmountRows,
  MissingBalanceDue,
  NoPaidNoRefund,
  TitleOverride,
  WithRefund
});
