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 SigplusWidgetDoc: VitruvioComponentDoc = {
   component: "SigplusWidget",
   summary: "Documentacao do componente SigplusWidget mapeada a partir de exemplos reais de XML.",
   status: "draft",
   context: {
      module: "Vitruvio",
      family: "Visualizacao",
      mappedFrom: ["Vitruvio/Paineis", "Vitruvio/Processos"],
      occurrences: { total: 2, paineis: 0, processos: 2 }
   },
   sections: {
      purpose: "Componente para exibicao de informacoes, resultados e feedback visual.",
      basicUsage: "Usar SigplusWidget no contexto adequado da tela; as propriedades abaixo foram observadas em exemplos reais do projeto.",
      properties: [
         "align",
         "caption",
         "drawCleanupButton",
         "drawPreview",
         "expandRatio",
         "height",
         "id",
         "width"
      ],
      propertyValues: {
         "align": ["TOP_CENTER"],
         "caption": ["", "Colher assinatura"],
         "drawCleanupButton": ["true"],
         "drawPreview": ["true"],
         "expandRatio": ["0.3"],
         "height": ["100%"],
         "id": ["assinaturaPlugin"],
         "width": ["100%", "75%"]
      },
      propertyValueTypes: {
         "align": "enum",
         "caption": "text",
         "drawCleanupButton": "boolean",
         "drawPreview": "boolean",
         "expandRatio": "numeric",
         "height": "numeric",
         "id": "enum",
         "width": "numeric"
      },
      events: [

      ],
      examples: [
         "Vitruvio/Processos/Devolução de Clientes Via Voucher/form_web_desktop.xml:2570",
         "Vitruvio/Processos/Assinatura Padrão/form_web_desktop.xml:275"
      ],
      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 SigplusWidgetDoc;
