{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/components/block_modal.js"],"names":["BlockModal","connect","getAccount","makeGetAccount","state","account","getIn","dispatch","onConfirm","blockAccount","get","onBlockAndReport","initReport","onClose","closeModal","injectIntl","props","c","button","componentDidMount","this","focus","render","className","id","defaultMessage","values","name","onClick","handleCancel","handleSecondary","handleClick","ref","setRef","React","PureComponent"],"mappings":"oPAwCMA,EAFUC,kBA3BY,WAC1B,IAAMC,EAAaC,cAMnB,OAJwB,SAAAC,GAAK,MAAK,CAChCC,QAASH,EAAWE,EAAOA,EAAME,MAAM,CAAC,SAAU,MAAO,mBAMlC,SAAAC,GACzB,MAAO,CACLC,UADK,SACKH,GACRE,EAASE,YAAaJ,EAAQK,IAAI,SAGpCC,iBALK,SAKYN,GACfE,EAASE,YAAaJ,EAAQK,IAAI,QAClCH,EAASK,YAAWP,KAGtBQ,QAVK,WAWHN,EAASO,kB,GAMdC,Y,8LAee,WACZ,EAAKC,MAAMH,UACX,EAAKG,MAAMR,UAAU,EAAKQ,MAAMX,W,6CAGhB,WAChB,EAAKW,MAAMH,UACX,EAAKG,MAAML,iBAAiB,EAAKK,MAAMX,W,0CAG1B,WACb,EAAKW,MAAMH,Y,oCAGJ,SAACI,GACR,EAAKC,OAASD,I,8CAnBhBE,kBAAA,WACEC,KAAKF,OAAOG,S,EAqBdC,OAAA,WAAW,IACDjB,EAAYe,KAAKJ,MAAjBX,QAER,OACE,mBAAKkB,UAAU,sCAAf,EACE,mBAAKA,UAAU,+BAAf,EACE,0BACE,YAAC,IAAD,CACEC,GAAG,8BACHC,eAAe,yCACfC,OAAQ,CAAEC,KAAM,mCAAUtB,EAAQK,IAAI,cAK5C,mBAAKa,UAAU,gCAAf,EACE,YAAC,IAAD,CAAQK,QAASR,KAAKS,aAAcN,UAAU,mCAA9C,EACE,YAAC,IAAD,CAAkBC,GAAG,4BAA4BC,eAAe,YAElE,YAAC,IAAD,CAAQG,QAASR,KAAKU,gBAAiBP,UAAU,6CAAjD,EACE,YAAC,IAAD,CAAkBC,GAAG,uCAAuCC,eAAe,oBAE7E,kBAAC,IAAD,CAAQG,QAASR,KAAKW,YAAaC,IAAKZ,KAAKa,QAC3C,YAAC,IAAD,CAAkBT,GAAG,8BAA8BC,eAAe,c,GAvDrDS,IAAMC,iB","file":"modals/block_modal.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport { makeGetAccount } from '../../../selectors';\nimport Button from '../../../components/button';\nimport { closeModal } from '../../../actions/modal';\nimport { blockAccount } from '../../../actions/accounts';\nimport { initReport } from '../../../actions/reports';\n\n\nconst makeMapStateToProps = () => {\n const getAccount = makeGetAccount();\n\n const mapStateToProps = state => ({\n account: getAccount(state, state.getIn(['blocks', 'new', 'account_id'])),\n });\n\n return mapStateToProps;\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onConfirm(account) {\n dispatch(blockAccount(account.get('id')));\n },\n\n onBlockAndReport(account) {\n dispatch(blockAccount(account.get('id')));\n dispatch(initReport(account));\n },\n\n onClose() {\n dispatch(closeModal());\n },\n };\n};\n\nexport default @connect(makeMapStateToProps, mapDispatchToProps)\n@injectIntl\nclass BlockModal extends React.PureComponent {\n\n static propTypes = {\n account: PropTypes.object.isRequired,\n onClose: PropTypes.func.isRequired,\n onBlockAndReport: PropTypes.func.isRequired,\n onConfirm: 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);\n }\n\n handleSecondary = () => {\n this.props.onClose();\n this.props.onBlockAndReport(this.props.account);\n }\n\n handleCancel = () => {\n this.props.onClose();\n }\n\n setRef = (c) => {\n this.button = c;\n }\n\n render () {\n const { account } = this.props;\n\n return (\n
\n