{"version":3,"file":"Tabs-Qb3bQtqy.js","sources":["../../Client/legacy/Components/Tabs.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nexport class TabGroup extends React.Component<{ tabs: Tab[] }, { selectedIndex: number }> {\r\n    state = {\r\n        selectedIndex: 0,\r\n    };\r\n\r\n    render() {\r\n        return (\r\n            <div className='tab-group-cp'>\r\n                <div className='tab-group-header-cp'>\r\n                    {this.props.tabs.map((tab: Tab, index: number) => (\r\n                        <span\r\n                            key={tab.getTitle()}\r\n                            className={`tab-group-header-title-cp ${this.state.selectedIndex === index ? 'tab-group-header-title-selected-cp' : ''}`}\r\n                            onClick={() => this.setState({ selectedIndex: index })}\r\n                        >\r\n                            {tab.getTitle()}\r\n                        </span>\r\n                    ))}\r\n                </div>\r\n\r\n                <div className='tabs-wrapper-cp'>\r\n                    <div className='tab-cp'>{this.props.tabs[this.state.selectedIndex].render()}</div>\r\n                </div>\r\n\r\n                <div className='clearfix'></div>\r\n            </div>\r\n        );\r\n    }\r\n}\r\n\r\nexport class Tab {\r\n    private title: string;\r\n    private renderer: () => JSX.Element;\r\n\r\n    constructor(title: string, renderer: () => JSX.Element) {\r\n        this.title = title;\r\n        this.renderer = renderer;\r\n    }\r\n\r\n    getTitle() {\r\n        return this.title;\r\n    }\r\n\r\n    render() {\r\n        return this.renderer();\r\n    }\r\n}\r\n"],"names":["TabGroup","React.Component","__publicField","jsxs","jsx","tab","index","Tab","title","renderer"],"mappings":"mNAEa,MAAAA,UAAiBC,EAAAA,SAA4D,CAA7E,kCACTC,EAAA,aAAQ,CACJ,cAAe,CACnB,GAEA,QAAS,CAED,OAAAC,EAAA,KAAC,MAAI,CAAA,UAAU,eACX,SAAA,CAACC,EAAAA,IAAA,MAAA,CAAI,UAAU,sBACV,SAAA,KAAK,MAAM,KAAK,IAAI,CAACC,EAAUC,IAC5BF,EAAA,IAAC,OAAA,CAEG,UAAW,6BAA6B,KAAK,MAAM,gBAAkBE,EAAQ,qCAAuC,EAAE,GACtH,QAAS,IAAM,KAAK,SAAS,CAAE,cAAeA,EAAO,EAEpD,WAAI,SAAS,CAAA,EAJTD,EAAI,SAAS,CAMzB,CAAA,EACL,QAEC,MAAI,CAAA,UAAU,kBACX,SAAAD,MAAC,OAAI,UAAU,SAAU,SAAK,KAAA,MAAM,KAAK,KAAK,MAAM,aAAa,EAAE,QAAS,CAAA,EAChF,EAEAA,EAAAA,IAAC,MAAI,CAAA,UAAU,UAAW,CAAA,CAAA,EAC9B,CAAA,CAGZ,CAEO,MAAMG,CAAI,CAIb,YAAYC,EAAeC,EAA6B,CAHhDP,EAAA,cACAA,EAAA,iBAGJ,KAAK,MAAQM,EACb,KAAK,SAAWC,CAAA,CAGpB,UAAW,CACP,OAAO,KAAK,KAAA,CAGhB,QAAS,CACL,OAAO,KAAK,SAAS,CAAA,CAE7B"}