{"version":3,"sources":["webpack:///./Scripts/Columbus/Containers/ProductInfoTab.container.js"],"names":["ProductInfoTab","props","buttonRef","React","createRef","this","setExplodedViewCount","explodedViewImgCount","event","radioTag","target","parentElement","querySelector","setActiveTab","tabType","onClick","setTab","title","className","Component","connect","state","activeInfoTab","productInfoTab","dispatch","name","count"],"mappings":"4NAIMA,E,YACF,WAAYC,GAAO,0BACf,4BAAMA,KACDC,UAAYC,IAAMC,YAFR,E,iEAKC,MAEuCC,KAAKJ,MAApDK,EAFQ,EAERA,qBAAsBC,EAFd,EAEcA,qBAC1BD,GAAwBC,GACxBD,EAAqBC,K,6BAItBC,GACH,IAEMC,EAFKD,EAAME,OACCC,cAAcA,cACRC,cAAc,+BAH5B,EAKsBP,KAAKJ,MAA/BY,EALI,EAKJA,aAAcC,EALV,EAKUA,QAEhBD,GAAgBC,IACZL,IACAK,EAAU,IAEdD,EAAaC,M,+BAIZ,WACL,OACI,kBAAC,WAAD,KACI,0BAAMC,QAAS,SAAAP,GAAW,EAAKQ,OAAOR,KAAWH,KAAKJ,MAAMgB,MAA5D,IAAmE,uBAAGC,UAAU,wBAA0B,uBAAGA,UAAU,4B,GAhC1GC,aAmDdC,uBAbS,SAAAC,GACpB,MAAO,CACHC,cAAeD,EAAME,eAAeD,kBAIjB,SAAAE,GACvB,MAAO,CACHX,aAAc,SAACY,GAAD,OAAUD,EAASX,YAAaY,KAC9CnB,qBAAsB,SAACoB,GAAD,OAAWF,EAASlB,YAAqBoB,QAIxDN,CAA6CpB","file":"27.6aa1e707737f02d1c7c8.js","sourcesContent":["import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { setActiveTab, setExplodedViewCount } from '../Actions/ProductInfoTab.action';\r\n\r\nclass ProductInfoTab extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.buttonRef = React.createRef();\r\n    }\r\n\r\n    componentDidMount() {\r\n\r\n        const { setExplodedViewCount, explodedViewImgCount } = this.props;\r\n        if (setExplodedViewCount && explodedViewImgCount) {\r\n            setExplodedViewCount(explodedViewImgCount);\r\n        }\r\n    }\r\n\r\n    setTab(event) {\r\n        const el = event.target;\r\n        const tabTag = el.parentElement.parentElement;\r\n        const radioTag = tabTag.querySelector('input.tab__checkbox:checked');\r\n        \r\n        let { setActiveTab, tabType } = this.props;\r\n        \r\n        if (setActiveTab && tabType) {\r\n            if (radioTag) {\r\n                tabType = '';\r\n            }\r\n            setActiveTab(tabType);\r\n        }\r\n    }\r\n    \r\n    render() {\r\n        return (\r\n            <Fragment>\r\n                <span onClick={event => { this.setTab(event) }}>{this.props.title} <i className=\"fas fa-chevron-down\"></i><i className=\"fas fa-chevron-up\"></i></span>\r\n            </Fragment>\r\n        );\r\n    }\r\n}\r\n\r\nconst mapStateToProps = state => {\r\n    return {\r\n        activeInfoTab: state.productInfoTab.activeInfoTab,\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => {\r\n    return {\r\n        setActiveTab: (name) => dispatch(setActiveTab(name)),\r\n        setExplodedViewCount: (count) => dispatch(setExplodedViewCount(count)),\r\n    }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ProductInfoTab);"],"sourceRoot":""}