| 58759 | let { authActions: o } = this.props |
| 58760 | o.showDefinitions(!1) |
| 58761 | } |
| 58762 | render() { |
| 58763 | let { definitions: s, getComponent: o, authSelectors: i, errSelectors: a } = this.props |
| 58764 | const u = o('AuthItem'), |
| 58765 | _ = o('oauth2', !0), |
| 58766 | w = o('Button') |
| 58767 | let x = i.authorized(), |
| 58768 | C = s.filter((s, o) => !!x.get(o)), |
| 58769 | j = s.filter((s) => 'oauth2' !== s.get('type')), |
| 58770 | L = s.filter((s) => 'oauth2' === s.get('type')) |
| 58771 | return Re.createElement( |
| 58772 | 'div', |
| 58773 | { className: 'auth-container' }, |
| 58774 | !!j.size && |
| 58775 | Re.createElement( |
| 58776 | 'form', |
| 58777 | { onSubmit: this.submitAuth }, |
| 58778 | j |
| 58779 | .map((s, _) => |
| 58780 | Re.createElement(u, { |
| 58781 | key: _, |
| 58782 | schema: s, |
| 58783 | name: _, |
| 58784 | getComponent: o, |
| 58785 | onAuthChange: this.onAuthChange, |
| 58786 | authorized: x, |
| 58787 | errSelectors: a, |
| 58788 | authSelectors: i, |
| 58789 | }) |
| 58790 | ) |
| 58791 | .toArray(), |
| 58792 | Re.createElement( |
| 58793 | 'div', |
| 58794 | { className: 'auth-btn-wrapper' }, |
| 58795 | j.size === C.size |
| 58796 | ? Re.createElement( |
| 58797 | w, |
| 58798 | { |
| 58799 | className: 'btn modal-btn auth', |
| 58800 | onClick: this.logoutClick, |
| 58801 | 'aria-label': 'Remove authorization', |
| 58802 | }, |
| 58803 | 'Logout' |
| 58804 | ) |
| 58805 | : Re.createElement( |
| 58806 | w, |
| 58807 | { |
| 58808 | type: 'submit', |
| 58809 | className: 'btn modal-btn auth authorize', |
| 58810 | 'aria-label': 'Apply credentials', |
| 58811 | }, |
| 58812 | 'Authorize' |
| 58813 | ), |
| 58814 | Re.createElement( |
| 58815 | w, |
| 58816 | { className: 'btn modal-btn auth btn-done', onClick: this.close }, |
| 58817 | 'Close' |
| 58818 | ) |