import{P as o}from"./PzNumberFormat-D5xYsZ3A.js";import{P as a}from"./PzText-D5PUnIjq.js";import"./lodash-CdDiHlzQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-Bl-fVlm8.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const x={title:"Utilities/PzNumberFormat",parameters:{docs:{description:{component:"The `PzNumberFormat` utility is used to format numbers consistently, adding division for thousands and handling decimals."}}}},e={render:()=>({components:{pzText:a},setup(){return{examples:[{value:1234567,description:"Millions without decimals"},{value:1234567891e-3,precision:2,description:"Millions with 2 decimals precision"},{value:"54321.1",description:"String input with 1 decimal"},{value:0,description:"Zero"},{value:"-",description:"Invalid/empty dash"},{value:null,description:"Null value"}].map(n=>({...n,result:new o(n.value,n.precision).number}))}},template:`
      <div>
        <pz-text variant="h4-semibold">PzNumberFormat Usage</pz-text>
        <ul style="margin-top: 16px; padding-left: 20px;">
          <li v-for="(ex, index) in examples" :key="index" style="margin-top: 8px;">
            <pz-text variant="body-regular">
              <strong>{{ ex.description }}:</strong> Input: <code>{{ ex.value }}</code>, Output: <code>{{ ex.result }}</code>
            </pz-text>
          </li>
        </ul>
      </div>
    `})};var t,i,r;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`{
  render: () => ({
    components: {
      pzText: PzText
    },
    setup() {
      return {
        examples: [{
          value: 1234567,
          description: "Millions without decimals"
        }, {
          value: 1234567.891,
          precision: 2,
          description: "Millions with 2 decimals precision"
        }, {
          value: "54321.1",
          description: "String input with 1 decimal"
        }, {
          value: 0,
          description: "Zero"
        }, {
          value: "-",
          description: "Invalid/empty dash"
        }, {
          value: null,
          description: "Null value"
        }].map(item => ({
          ...item,
          result: new PzNumberFormat(item.value, item.precision).number
        }))
      };
    },
    template: \`
      <div>
        <pz-text variant="h4-semibold">PzNumberFormat Usage</pz-text>
        <ul style="margin-top: 16px; padding-left: 20px;">
          <li v-for="(ex, index) in examples" :key="index" style="margin-top: 8px;">
            <pz-text variant="body-regular">
              <strong>{{ ex.description }}:</strong> Input: <code>{{ ex.value }}</code>, Output: <code>{{ ex.result }}</code>
            </pz-text>
          </li>
        </ul>
      </div>
    \`
  })
}`,...(r=(i=e.parameters)==null?void 0:i.docs)==null?void 0:r.source}}};const v=["Usage"];export{e as Usage,v as __namedExportsOrder,x as default};
