24 lines
639 B
TypeScript
24 lines
639 B
TypeScript
export interface AgentPsdTemplateSecondaryCategoryConfig {
|
|
enabled: boolean;
|
|
}
|
|
|
|
export const AGENT_PSD_TEMPLATE_SECONDARY_CATEGORY_CONFIG_KEY =
|
|
"agent_psd_template_secondary_category_config";
|
|
|
|
export const defaultAgentPsdTemplateSecondaryCategoryConfig: AgentPsdTemplateSecondaryCategoryConfig = {
|
|
enabled: false,
|
|
};
|
|
|
|
export function normalizeAgentPsdTemplateSecondaryCategoryConfig(
|
|
value: unknown
|
|
): AgentPsdTemplateSecondaryCategoryConfig {
|
|
const raw =
|
|
value && typeof value === "object" && !Array.isArray(value)
|
|
? (value as Record<string, unknown>)
|
|
: {};
|
|
|
|
return {
|
|
enabled: raw.enabled === true,
|
|
};
|
|
}
|