import { h, Component } from '/js/web_modules/preact.js';
import htm from '/js/web_modules/htm.js';
import TabBar from './tab-bar.js';
import IndieAuthForm from './auth-indieauth.js';
import FediverseAuth from './auth-fediverse.js';
const html = htm.bind(h);
export default class ChatSettingsModal extends Component {
render() {
const {
accessToken,
authenticated,
federationEnabled,
username,
indieAuthEnabled,
} = this.props;
const TAB_CONTENT = [];
if (indieAuthEnabled) {
TAB_CONTENT.push({
label: html`
IndieAuth`,
content: html`<${IndieAuthForm}}
accessToken=${accessToken}
authenticated=${authenticated}
username=${username}
/>`,
});
}
if (federationEnabled) {
TAB_CONTENT.push({
label: html`
FediAuth`,
content: html`<${FediverseAuth}}
authenticated=${authenticated}
accessToken=${accessToken}
authenticated=${authenticated}
username=${username}
/>`,
});
}
return html`
Note: This is for authentication purposes only, and no personal information will be accessed or stored.