export type VitruvioComponentDoc = {
   component: string;
   summary: string;
   status: "draft" | "review" | "ready";
   context: {
      module: string;
      family: string;
      mappedFrom: string[];
      occurrences: {
         total: number;
         paineis: number;
         processos: number;
      };
   };
   sections: {
      purpose: string;
      basicUsage: string;
      properties: string[];
      propertyValues: { [property: string]: string[] };
      propertyValueTypes: { [property: string]: "boolean" | "enum" | "numeric" | "text" | "mixed" };
      events: string[];
      examples: string[];
      notes: string[];
   };
};

const DBFilterDoc: VitruvioComponentDoc = {
   component: "DBFilter",
   summary: "Documentacao do componente DBFilter mapeada a partir de exemplos reais de XML.",
   status: "draft",
   context: {
      module: "Vitruvio",
      family: "BancoDeDados",
      mappedFrom: ["Vitruvio/Paineis", "Vitruvio/Processos"],
      occurrences: { total: 228, paineis: 197, processos: 31 }
   },
   sections: {
      purpose: "Componente orientado a dados com integracao de datasource SQL e bind de parametros.",
      basicUsage: "Usar DBFilter no contexto adequado da tela; as propriedades abaixo foram observadas em exemplos reais do projeto.",
      properties: [
         "caption",
         "dbtableId",
         "dynamicColumns",
         "filterLayoutId",
         "id",
         "renderType",
         "showSelected",
         "width"
      ],
      propertyValues: {
         "caption": ["Filtrar", "Filtro", "Filtros"],
         "dbtableId": ["dadosExibicaoRateio", "dbImportados", "dbProcessados", "dbProdutos", "dbt__itens", "dbtAgendamentos", "dbtAnalise", "dbtCadastro", "dbtCasosDetalhado", "dbtCasosResumoDepartamento", "dbtCasosResumoEstadoCont", "dbtCasosResumoResponsavel", "dbtCasosResumoStatus", "dbtConcorrencia", "dbtContagens", "__TRUNCADO__"],
         "dynamicColumns": ["true"],
         "filterLayoutId": ["lauyoutFilters"],
         "id": ["dbf__filtro", "dbFilter2", "dbFilterRegras", "dbFiltrar", "dbfPesquisaDescricao", "dbtFiltro", "dbtFiltro2", "dbtFiltro3", "dbtFiltro4", "dbtFiltro5", "dbtFiltroEntradas", "dbtFiltroEntradasRest", "dbtFiltroPedidos", "dbtFiltroPedidosRest", "f1", "__TRUNCADO__"],
         "renderType": ["BUTTON", "INLINE", "TARGET"],
         "showSelected": ["true"],
         "width": ["10%", "100%"]
      },
      propertyValueTypes: {
         "caption": "text",
         "dbtableId": "text",
         "dynamicColumns": "boolean",
         "filterLayoutId": "enum",
         "id": "text",
         "renderType": "enum",
         "showSelected": "boolean",
         "width": "numeric"
      },
      events: [

      ],
      examples: [
         "Vitruvio/Paineis/FIFO.xml:862",
         "Vitruvio/Paineis/FIFO.xml:1305",
         "Vitruvio/Paineis/FIFO.xml:1736",
         "Vitruvio/Paineis/FIFO.xml:2017",
         "Vitruvio/Paineis/Painel de Queijos.xml:173",
         "Vitruvio/Paineis/Painel de Queijos.xml:343",
         "Vitruvio/Paineis/Painel de Queijos.xml:490",
         "Vitruvio/Paineis/Painel de Queijos.xml:559",
         "Vitruvio/Paineis/Cadastro de Elementos.xml:474",
         "Vitruvio/Paineis/Nfse - TESTE.xml:833",
         "Vitruvio/Paineis/12 - Cadastro de Tópicos.xml:253",
         "Vitruvio/Paineis/Abastecimento Geral - Debug.xml:391"
      ],
      notes: [
         "Mapeamento automatico baseado em uso observado nos XMLs de paineis e processos.",
         "Valores ruidosos/textos muito longos sao filtrados para facilitar consulta.",
         "propertyValueTypes classifica o perfil observado da propriedade (boolean, enum, numeric, text ou mixed).",
         "Validar com documentacao oficial do Vitruvio quando houver divergencia funcional."
      ]
   }
};

export default DBFilterDoc;
