import type { IconType } from "~/components/IconComponents"; import type { Caratteristiche } from "~/utils/kanel-types"; export type CaratteristicheFiltered = ReturnType< typeof filteredCaratteristiche >; export const filteredCaratteristiche = (caratteristiche: Caratteristiche) => { /* eslint-disable @typescript-eslint/no-unused-vars */ const { Scheda_Grado, Scheda_OneriUrbanizzazione, Scheda_AffittoMuriAnno, Scheda_ScadenzaContratto, Scheda_CanoniAnticipati, Scheda_OrariApertura, Scheda_PossibilitàAcquistoMuri, Scheda_SpCondominialiAnno, Scheda_Cauzione, Scheda_IncassoAnnuo, Scheda_NumeroVetrine, Scheda_NumeroDipendenti, Scheda_PostiSedere, Scheda_TipoGestione, Scheda_TipoRegistr, Scheda_TipoContratto, Scheda_Destinazione, Scheda_Pavimento, Scheda_PavimentoCucina, Scheda_PavimentoBagno, Scheda_PavimentoNotte, Scheda_PavimentoGiorno, Scheda_LatiLiberi, Scheda_ElettricitaGas, Scheda_IndiceEdificabilita, Scheda_CambioBiancheria, Scheda_Categoria, Scheda_Panorama, Scheda_TipoSaracinesca, Scheda_Appartamenti, ...rest } = caratteristiche; const filtered = [ { text: "Tipo Impianto", icon: "heater" as IconType, value: rest.Scheda_TipoImpianto, }, { text: "Riscaldamento", icon: "thermometer-sun" as IconType, value: rest.Scheda_Riscaldamento, }, { text: "Arredi", icon: "sofa" as IconType, value: rest.Scheda_Arredi, }, { text: "Piano", icon: "building" as IconType, value: rest.Scheda_Piano, }, { text: "Piani Edificio", icon: "building2" as IconType, value: rest.Scheda_TotalePiani, }, { text: "Orientamento", icon: "dot" as IconType, value: rest.Scheda_Orientamento, }, { text: "Internet", icon: "wifi" as IconType, value: rest.Scheda_Internet, }, ]; return filtered; /* const caratteristicheGrouped = { Riscald_Raffresc: { GroupIcon: "thermometer-sun" as IconType, values: { Scheda_AcquaCalda: { text: "Acqua Calda", icon: "dot" as IconType, value: rest.Scheda_AcquaCalda, }, Scheda_TipoImpianto: { text: "Tipo Impianto", icon: "dot" as IconType, value: rest.Scheda_TipoImpianto, }, Scheda_Riscaldamento: { text: "Riscaldamento", icon: "dot" as IconType, value: rest.Scheda_Riscaldamento, }, Scheda_TipoRiscaldamento: { text: "Tipo Riscaldamento", icon: "dot" as IconType, value: rest.Scheda_TipoRiscaldamento, }, Scheda_Raffrescamento: { text: "Raffrescamento", icon: "dot" as IconType, value: rest.Scheda_Raffrescamento, }, Scheda_FonteEnergetica: { text: "Fonte Energetica", icon: "dot" as IconType, value: rest.Scheda_FonteEnergetica, }, }, }, Arredi: { GroupIcon: "sofa" as IconType, values: { Scheda_Arredi: { text: "Arredi", icon: "dot" as IconType, value: rest.Scheda_Arredi, }, Scheda_Tv: { text: "Tv", icon: "dot" as IconType, value: rest.Scheda_Tv, }, Scheda_Persiana: { text: "Persiana", icon: "dot" as IconType, value: rest.Scheda_Persiana, }, Scheda_Infissi: { text: "Infissi", icon: "dot" as IconType, value: rest.Scheda_Infissi, }, Scheda_TipoCucina: { text: "Tipo Cucina", icon: "dot" as IconType, value: rest.Scheda_TipoCucina, }, Scheda_Serramenti: { text: "Serramenti", icon: "dot" as IconType, value: rest.Scheda_Serramenti, }, }, }, Immobile: { GroupIcon: "building" as IconType, values: { Scheda_Terrazzi: { text: "Terrazzi", icon: "dot" as IconType, value: rest.Scheda_Terrazzi, }, Scheda_Balconi: { text: "Balconi", icon: "dot" as IconType, value: rest.Scheda_Balconi, }, Scheda_NumeroCamere: { text: "Numero Camere", icon: "dot" as IconType, value: rest.Scheda_NumeroCamere, }, Scheda_Taverna: { text: "Taverna", icon: "dot" as IconType, value: rest.Scheda_Taverna, }, Scheda_Giardino: { text: "Giardino", icon: "dot" as IconType, value: rest.Scheda_Giardino, }, Scheda_Magazzino: { text: "Magazzino", icon: "dot" as IconType, value: rest.Scheda_Magazzino, }, Scheda_CantinaSolaio: { text: "Cantina Solaio", icon: "dot" as IconType, value: rest.Scheda_CantinaSolaio, }, Scheda_SpazioParcheggio: { text: "Spazio Parcheggio", icon: "dot" as IconType, value: rest.Scheda_SpazioParcheggio, }, }, }, Edificio: { GroupIcon: "building2" as IconType, values: { Scheda_Orientamento: { text: "Orientamento", icon: "dot" as IconType, value: rest.Scheda_Orientamento, }, Scheda_Piano: { text: "Piano", icon: "dot" as IconType, value: rest.Scheda_Piano, }, Scheda_TotalePiani: { text: "Totale Piani", icon: "dot" as IconType, value: rest.Scheda_TotalePiani, }, Scheda_StatoImmobile: { text: "Stato Immobile", icon: "dot" as IconType, value: rest.Scheda_StatoImmobile, }, }, }, Altro: { GroupIcon: "circle-plus" as IconType, values: { Scheda_Internet: { text: "Internet", icon: "wifi" as IconType, value: rest.Scheda_Internet, }, Scheda_Pulizie: { text: "Pulizie", icon: "dot" as IconType, value: rest.Scheda_Pulizie, }, Scheda_AccessoDisabili: { text: "Accesso Disabili", icon: "accessibility" as IconType, value: rest.Scheda_AccessoDisabili, }, Scheda_AccoglienzaBimbi: { text: "Accoglienza Bimbi", icon: "baby" as IconType, value: rest.Scheda_AccoglienzaBimbi, }, }, }, }; return caratteristicheGrouped;*/ };