import { defineStore } from "pinia";

export const useRadioStore = defineStore("radio", {
  state: () => {
    return {
      radios: {
        "https://www.ondarossa.info": {
          name: "ROR",
        },
        "https://radiospore.oziosi.org": {
          name: "Spore",
        },
      },
    };
  },
  // could also be defined as
  // state: () => ({ count: 0 })
  actions: {
    cambia() {
      const oneRadio = Object.keys(this.radios)[0];
      this.radios[oneRadio].name = "asd " + Math.random()
    },
  },
})
