{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/components/mute_modal.js"],"names":["MuteModal","connect","state","account","getIn","notifications","dispatch","onConfirm","muteAccount","get","onClose","closeModal","onToggleNotifications","toggleHideNotifications","injectIntl","props","c","button","componentDidMount","this","focus","render","className","id","defaultMessage","values","name","checked","onChange","toggleNotifications","htmlFor","onClick","handleCancel","handleClick","ref","setRef","React","PureComponent"],"mappings":"8PAoCMA,EAFUC,kBAvBQ,SAAAC,GACtB,MAAO,CACLC,QAASD,EAAME,MAAM,CAAC,QAAS,MAAO,YACtCC,cAAeH,EAAME,MAAM,CAAC,QAAS,MAAO,oBAIrB,SAAAE,GACzB,MAAO,CACLC,UADK,SACKJ,EAASE,GACjBC,EAASE,YAAYL,EAAQM,IAAI,MAAOJ,KAG1CK,QALK,WAMHJ,EAASK,gBAGXC,sBATK,WAUHN,EAASO,kB,GAMdC,Y,8LAgBe,WACZ,EAAKC,MAAML,UACX,EAAKK,MAAMR,UAAU,EAAKQ,MAAMZ,QAAS,EAAKY,MAAMV,iB,0CAGvC,WACb,EAAKU,MAAML,Y,oCAGJ,SAACM,GACR,EAAKC,OAASD,I,iDAGM,WACpB,EAAKD,MAAMH,0B,8CAlBbM,kBAAA,WACEC,KAAKF,OAAOG,S,EAoBdC,OAAA,WAAW,IAAD,EAC2BF,KAAKJ,MAAhCZ,EADA,EACAA,QAASE,EADT,EACSA,cAEjB,OACE,mBAAKiB,UAAU,qCAAf,EACE,mBAAKA,UAAU,8BAAf,EACE,0BACE,YAAC,IAAD,CACEC,GAAG,6BACHC,eAAe,wCACfC,OAAQ,CAAEC,KAAM,mCAAUvB,EAAQM,IAAI,aAG1C,iBAAGa,UAAU,gCAAb,EACE,YAAC,IAAD,CACEC,GAAG,iCACHC,eAAe,0HAGnB,mBAAKF,UAAU,uBAAf,EACE,YAAC,IAAD,CAAQC,GAAG,0CAA0CI,QAAStB,EAAeuB,SAAUT,KAAKU,sBAC5F,qBAAOP,UAAU,wBAAwBQ,QAAQ,gDAAjD,EACE,YAAC,IAAD,CAAkBP,GAAG,gCAAgCC,eAAe,0CAK1E,mBAAKF,UAAU,+BAAf,EACE,YAAC,IAAD,CAAQS,QAASZ,KAAKa,aAAcV,UAAU,kCAA9C,EACE,YAAC,IAAD,CAAkBC,GAAG,4BAA4BC,eAAe,YAElE,kBAAC,IAAD,CAAQO,QAASZ,KAAKc,YAAaC,IAAKf,KAAKgB,QAC3C,YAAC,IAAD,CAAkBZ,GAAG,6BAA6BC,eAAe,a,GAhErDY,IAAMC,iB","file":"modals/mute_modal.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport Toggle from 'react-toggle';\nimport Button from '../../../components/button';\nimport { closeModal } from '../../../actions/modal';\nimport { muteAccount } from '../../../actions/accounts';\nimport { toggleHideNotifications } from '../../../actions/mutes';\n\n\nconst mapStateToProps = state => {\n return {\n account: state.getIn(['mutes', 'new', 'account']),\n notifications: state.getIn(['mutes', 'new', 'notifications']),\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onConfirm(account, notifications) {\n dispatch(muteAccount(account.get('id'), notifications));\n },\n\n onClose() {\n dispatch(closeModal());\n },\n\n onToggleNotifications() {\n dispatch(toggleHideNotifications());\n },\n };\n};\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass MuteModal extends React.PureComponent {\n\n static propTypes = {\n account: PropTypes.object.isRequired,\n notifications: PropTypes.bool.isRequired,\n onClose: PropTypes.func.isRequired,\n onConfirm: PropTypes.func.isRequired,\n onToggleNotifications: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n componentDidMount() {\n this.button.focus();\n }\n\n handleClick = () => {\n this.props.onClose();\n this.props.onConfirm(this.props.account, this.props.notifications);\n }\n\n handleCancel = () => {\n this.props.onClose();\n }\n\n setRef = (c) => {\n this.button = c;\n }\n\n toggleNotifications = () => {\n this.props.onToggleNotifications();\n }\n\n render () {\n const { account, notifications } = this.props;\n\n return (\n
\n
\n