import { defineStore } from 'pinia' import { ref } from 'vue' // Define an interface for the account object interface NostrAccount { privkey: string pubkey: string } export const useNostrStore = defineStore('nostr', () => { const isConnected = ref(false) const relayUrls = ref([]) const account = ref(null) function setConnected(value: boolean) { isConnected.value = value } function setRelayUrls(urls: string[]) { relayUrls.value = urls } function setAccount(nostrAccount: NostrAccount | null) { account.value = nostrAccount } return { isConnected, relayUrls, account, setConnected, setRelayUrls, setAccount, } })