{i18n.t("settings.connections.spent")}
{i18n.t("settings.connections.remaining")}
);
}
function NwcDetails(props: {
profile: NwcProfile;
refetch: () => void;
onEdit?: () => void;
}) {
const i18n = useI18n();
const [state, _actions, sw] = useMegaStore();
const [confirmOpen, setConfirmOpen] = createSignal(false);
function confirmDelete() {
setConfirmOpen(true);
}
async function deleteProfile() {
try {
await sw.delete_nwc_profile(props.profile.index);
setConfirmOpen(false);
props.refetch();
} catch (e) {
console.error(e);
}
}
async function openInNostrClient() {
const uri = props.profile.nwc_uri;
await openLinkProgrammatically(uri, {
title: i18n.t("settings.connections.nostr_client_not_found"),
description: i18n.t(
"settings.connections.client_not_found_description"
)
});
}
return (