import { defineStore } from 'pinia'; import type { ProductTree } from '~~/types/banner'; interface ProductTreeState { productTree: ProductTree[]; } export const useProductTreeStore = defineStore('productTree', { state: (): ProductTreeState => ({ productTree: [], }), actions: { setProductTree(newProductTree: ProductTree[]): void { this.productTree = newProductTree; } } });