"use strict";(self.webpackChunk_pixelpay_ui_core=self.webpackChunk_pixelpay_ui_core||[]).push([[9580],{"./src/components/x-slider/playground.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Disabled:()=>Disabled,Loading:()=>Loading,Simple:()=>Simple,WithLabel:()=>WithLabel,WithSteps:()=>WithSteps,WithUnit:()=>WithUnit,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _utils_builder__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/builder.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Fields/Slider",component:"x-slider",argTypes:{color:_utils_builder__WEBPACK_IMPORTED_MODULE_0__.oi}},Template=new _utils_builder__WEBPACK_IMPORTED_MODULE_0__.Ay((args=>`<div>\n    <x-slider ${(0,_utils_builder__WEBPACK_IMPORTED_MODULE_0__.qT)(args)}></x-slider>\n</div>`)),Simple=Template.args({max:100,value:50}).build(),Loading=Template.args({label:"Select a value",loading:!0,max:100,value:50}).build(),Disabled=Template.args({label:"Select a value",disabled:!0,max:100,value:50}).build(),WithLabel=Template.args({label:"Select a value",min:30,max:50,value:50}).build(),WithSteps=Template.args({label:"Wich percentage do you want?",min:0,max:100,value:20,step:5}).build(),WithUnit=Template.args({label:"How many you will pay?",min:24.099,max:240.99,value:0,step:24.099,unit:"$",unitPosition:"left",decimals:2}).build(),__namedExportsOrder=["Simple","Loading","Disabled","WithLabel","WithSteps","WithUnit"];Simple.parameters={...Simple.parameters,docs:{...Simple.parameters?.docs,source:{originalSource:"Template.args({\n  max: 100,\n  value: 50\n}).build()",...Simple.parameters?.docs?.source}}},Loading.parameters={...Loading.parameters,docs:{...Loading.parameters?.docs,source:{originalSource:"Template.args({\n  label: 'Select a value',\n  loading: true,\n  max: 100,\n  value: 50\n}).build()",...Loading.parameters?.docs?.source}}},Disabled.parameters={...Disabled.parameters,docs:{...Disabled.parameters?.docs,source:{originalSource:"Template.args({\n  label: 'Select a value',\n  disabled: true,\n  max: 100,\n  value: 50\n}).build()",...Disabled.parameters?.docs?.source}}},WithLabel.parameters={...WithLabel.parameters,docs:{...WithLabel.parameters?.docs,source:{originalSource:"Template.args({\n  label: 'Select a value',\n  min: 30,\n  max: 50,\n  value: 50\n}).build()",...WithLabel.parameters?.docs?.source}}},WithSteps.parameters={...WithSteps.parameters,docs:{...WithSteps.parameters?.docs,source:{originalSource:"Template.args({\n  label: 'Wich percentage do you want?',\n  min: 0,\n  max: 100,\n  value: 20,\n  step: 5\n}).build()",...WithSteps.parameters?.docs?.source}}},WithUnit.parameters={...WithUnit.parameters,docs:{...WithUnit.parameters?.docs,source:{originalSource:"Template.args({\n  label: 'How many you will pay?',\n  min: 240.99 / 10,\n  max: 240.99,\n  value: 0,\n  step: 240.99 / 10,\n  unit: '$',\n  unitPosition: 'left',\n  decimals: 2\n}).build()",...WithUnit.parameters?.docs?.source}}}},"./src/utils/builder.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{oi:()=>ColorsControl,WZ:()=>CountriesControl,Sx:()=>IconsControl,aM:()=>LogosControl,Ay:()=>Template,qT:()=>toProps});const colors=["default","primary","accent","danger","warning","success","info","blue","indigo","purple","pink","red","orange","yellow","green","teal","cyan","brown","stone"];var dist=__webpack_require__("./node_modules/simply-beautiful/dist/index.js"),dist_default=__webpack_require__.n(dist),icons=__webpack_require__("./node_modules/@pixelpay/fonts/dist/icons.json"),logos=__webpack_require__("./node_modules/@pixelpay/fonts/dist/logos.json"),social=__webpack_require__("./node_modules/@pixelpay/fonts/dist/social.json"),flags=__webpack_require__("./node_modules/@pixelpay/fonts/dist/flags.json");const Icons=Object.keys(icons),Logos=Object.keys(logos),IconsControl=(Object.keys(social),{options:Icons,control:{type:"select"}}),LogosControl={options:Logos,control:{type:"select"}},ColorsControl={options:colors,control:{type:"select"}},CountriesControl={options:flags,control:{type:"select"}},toProps=(args,except=[])=>Object.keys(args).filter((key=>!except.includes(key))).map((key=>`${key.replace(/[A-Z]/g,(match=>"-"+match.toLowerCase()))}="${args[key]}"`)).join(" ");class Template{template;argsValues;argsTypes;doc;constructor(template){this.template=template,this.argsValues={},this.argsTypes={},this.doc=null}args(value){return this.argsValues=value,this}types(value){return this.argsTypes=value,this}build(overrideTemplate=null){const base=overrideTemplate||this.template,build={render:base};return build.args=this.argsValues,build.argTypes=this.argsTypes,build.parameters={storySource:{source:dist_default().html(base(build.args),{indent_size:2})}},build}}}}]);