{"ast":null,"code":"var _jsxFileName = \"/Users/skout/Desktop/Auditi/auditi_frontend/src/components/Searchbar.js\";\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport Audiocard from './Audiocard';\nimport { Card } from 'semantic-ui-react';\n\nconst Searchbar = props => {\n  const audiocards = props.audiocards.map(audio => /*#__PURE__*/React.createElement(Audiocard, {\n    audiocard: audio,\n    key: audio.id,\n    __self: this,\n    __source: {\n      fileName: _jsxFileName,\n      lineNumber: 9,\n      columnNumber: 9\n    }\n  }));\n  return /*#__PURE__*/React.createElement(\"div\", {\n    className: \"home-container\",\n    __self: this,\n    __source: {\n      fileName: _jsxFileName,\n      lineNumber: 13,\n      columnNumber: 9\n    }\n  }, /*#__PURE__*/React.createElement(Card.Group, {\n    itemsPerRow: 4,\n    __self: this,\n    __source: {\n      fileName: _jsxFileName,\n      lineNumber: 14,\n      columnNumber: 13\n    }\n  }, audiocards));\n};\n\nconst mapStateToProps = state => {\n  return {\n    audiocards: state.myAudioCards.filter(audio => audio.attributes.tags.toUpperCase().includes(state.searchbar.toUpperCase()) || audio.attributes.category.toUpperCase() === state.searchbar.toUpperCase() || audio.attributes.soundster.split(' ').includes(state.searchbar))\n  };\n};\n\nexport default connect(mapStateToProps)(Searchbar);","map":{"version":3,"sources":["/Users/skout/Desktop/Auditi/auditi_frontend/src/components/Searchbar.js"],"names":["React","connect","Audiocard","Card","Searchbar","props","audiocards","map","audio","id","mapStateToProps","state","myAudioCards","filter","attributes","tags","toUpperCase","includes","searchbar","category","soundster","split"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,QAAwB,aAAxB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,SAASC,IAAT,QAAqB,mBAArB;;AAEA,MAAMC,SAAS,GAAGC,KAAK,IAAI;AAEvB,QAAMC,UAAU,GAAGD,KAAK,CAACC,UAAN,CAAiBC,GAAjB,CAAqBC,KAAK,iBACzC,oBAAC,SAAD;AAAW,IAAA,SAAS,EAAEA,KAAtB;AAA6B,IAAA,GAAG,EAAEA,KAAK,CAACC,EAAxC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADe,CAAnB;AAIA,sBACI;AAAK,IAAA,SAAS,EAAC,gBAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBACI,oBAAC,IAAD,CAAM,KAAN;AAAY,IAAA,WAAW,EAAE,CAAzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACKH,UADL,CADJ,CADJ;AAQH,CAdD;;AAgBA,MAAMI,eAAe,GAAGC,KAAK,IAAI;AAC7B,SAAO;AACHL,IAAAA,UAAU,EAAEK,KAAK,CAACC,YAAN,CAAmBC,MAAnB,CACRL,KAAK,IACDA,KAAK,CAACM,UAAN,CAAiBC,IAAjB,CAAsBC,WAAtB,GAAoCC,QAApC,CAA6CN,KAAK,CAACO,SAAN,CAAgBF,WAAhB,EAA7C,KACCR,KAAK,CAACM,UAAN,CAAiBK,QAAjB,CAA0BH,WAA1B,OAA4CL,KAAK,CAACO,SAAN,CAAgBF,WAAhB,EAD7C,IAECR,KAAK,CAACM,UAAN,CAAiBM,SAAjB,CAA2BC,KAA3B,CAAiC,GAAjC,EAAsCJ,QAAtC,CAA+CN,KAAK,CAACO,SAArD,CAJG;AADT,GAAP;AAQH,CATD;;AAYA,eAAejB,OAAO,CAACS,eAAD,CAAP,CAAyBN,SAAzB,CAAf","sourcesContent":["import React from 'react'\nimport { connect } from 'react-redux'\nimport Audiocard from './Audiocard'\nimport { Card } from 'semantic-ui-react'\n\nconst Searchbar = props => {\n       \n    const audiocards = props.audiocards.map(audio => \n        <Audiocard audiocard={audio} key={audio.id} />\n    )\n    \n    return(\n        <div className=\"home-container\">\n            <Card.Group itemsPerRow={4}>\n                {audiocards}\n            </Card.Group>\n        </div>   \n    )\n    \n}\n\nconst mapStateToProps = state => {\n    return {\n        audiocards: state.myAudioCards.filter(\n            audio =>\n                audio.attributes.tags.toUpperCase().includes(state.searchbar.toUpperCase()) ||\n                (audio.attributes.category.toUpperCase() === state.searchbar.toUpperCase()) ||\n                (audio.attributes.soundster.split(' ').includes(state.searchbar))\n        )\n    }\n}\n\n\nexport default connect(mapStateToProps)(Searchbar)\n"]},"metadata":{},"sourceType":"module"}