import { defineStore } from "pinia"; export const useFormStore = defineStore("forms", { state: () => ({ postalCodeValid: { isValid: false, dataOptions: [], }, sortProductFilters: { isOpenOrderFilter: false, order: undefined, price: undefined, category: "ramos", }, question: { name: "", surname: "", email: "", phone: "", query: "", message: "", terms: false, }, availability: { dateExpired: "", postalCode: "", }, checkout: { name: "", surname: "", address: "", postalCode: "", city: "", province: "", phone: "", senderName: "", senderCifNif: "", senderEmail: "", senderPhone: "", senderNotes: "", paymentMethod: "paypal", terms: false, }, }), actions: { handleQuestionData(values) { this.question = values; }, handleAvailabilityData(values) { this.availability = values; }, registerAvailability() {}, handleCheckoutData(values) { this.checkout = values; }, }, });