import spinner from "templates/spinner.js";
import { __ } from 'i18n';
import { html } from "lit";
function getRoleHelpText (role) {
if (role === 'moderator') {
return __("Moderators are privileged users who can change the roles of other users (except those with admin or owner affiliations.");
} else if (role === 'participant') {
return __("The default role, implies that you can read and write messages.");
} else if (role == 'visitor') {
return __("Visitors aren't allowed to write messages in a moderated multi-user chat.");
}
}
function getAffiliationHelpText (aff) {
if (aff === 'owner') {
return __("Owner is the highest affiliation. Owners can modify roles and affiliations of all other users.");
} else if (aff === 'admin') {
return __("Admin is the 2nd highest affiliation. Admins can modify roles and affiliations of all other users except owners.");
} else if (aff === 'outcast') {
return __("To ban a user, you give them the affiliation of \"outcast\".");
}
}
const role_option = (o) => html`
`;
const affiliation_option = (o) => html`
`;
const tplRoleFormToggle = (o) => html`