"use strict";(self.webpackChunk_pixelpay_ui_core=self.webpackChunk_pixelpay_ui_core||[]).push([[3436],{"./src/components/x-badge/playground.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Colors:()=>Colors,IconLeft:()=>IconLeft,IconRight:()=>IconRight,Simple:()=>Simple,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _utils_builder__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/builder.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Elements/Badge",component:"x-badge",argTypes:{color:_utils_builder__WEBPACK_IMPORTED_MODULE_0__.oi,icon:_utils_builder__WEBPACK_IMPORTED_MODULE_0__.Sx,iconAlign:{options:["left","right"],control:{type:"radio"}}}},Template=new _utils_builder__WEBPACK_IMPORTED_MODULE_0__.Ay((args=>`<x-badge ${(0,_utils_builder__WEBPACK_IMPORTED_MODULE_0__.qT)(args,["text"])}>${args.text}</x-badge>`)),Simple=Template.args({text:"Hello",color:"primary"}).build(),Colors=Template.args({}).build((()=>`<div>\n    ${_utils_builder__WEBPACK_IMPORTED_MODULE_0__.oi.options.map((color=>`<x-badge icon="paint-brush" color="${color}">${color}</x-badge>`)).join("")}\n</div>`)),IconLeft=Template.args({text:"I have an icon",icon:"badge-package",color:"success"}).build(),IconRight=Template.args({text:"I have an icon",icon:"badge-fingerprint",color:"danger",iconAlign:"right"}).build(),__namedExportsOrder=["Simple","Colors","IconLeft","IconRight"];Simple.parameters={...Simple.parameters,docs:{...Simple.parameters?.docs,source:{originalSource:"Template.args({\n  text: 'Hello',\n  color: 'primary'\n}).build()",...Simple.parameters?.docs?.source}}},Colors.parameters={...Colors.parameters,docs:{...Colors.parameters?.docs,source:{originalSource:'Template.args({}).build(() => `<div>\n    ${ColorsControl.options.map(color => `<x-badge icon="paint-brush" color="${color}">${color}</x-badge>`).join(\'\')}\n</div>`)',...Colors.parameters?.docs?.source}}},IconLeft.parameters={...IconLeft.parameters,docs:{...IconLeft.parameters?.docs,source:{originalSource:"Template.args({\n  text: 'I have an icon',\n  icon: 'badge-package',\n  color: 'success'\n}).build()",...IconLeft.parameters?.docs?.source}}},IconRight.parameters={...IconRight.parameters,docs:{...IconRight.parameters?.docs,source:{originalSource:"Template.args({\n  text: 'I have an icon',\n  icon: 'badge-fingerprint',\n  color: 'danger',\n  iconAlign: 'right'\n}).build()",...IconRight.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}}}}]);