| 1 |
import type { Integration } from '@/types/models'; |
| 2 |
|
| 3 |
export const HOSTINGER_REACH_ID = 'hostinger-reach'; |
| 4 |
export const WOOCOMMERCE_ID = 'woocommerce'; |
| 5 |
|
| 6 |
export const PLUGIN_STATUSES = { |
| 7 |
ACTIVE: 'active', |
| 8 |
INACTIVE: 'inactive' |
| 9 |
} as const; |
| 10 |
|
| 11 |
export type PluginStatus = (typeof PLUGIN_STATUSES)[keyof typeof PLUGIN_STATUSES]; |
| 12 |
|
| 13 |
export interface PluginInfo { |
| 14 |
id: string; |
| 15 |
icon: string; |
| 16 |
isViewFormHidden: boolean; |
| 17 |
isEditFormHidden: boolean; |
| 18 |
} |
| 19 |
|
| 20 |
export const getPluginInfo = (integration: Integration): PluginInfo => ({ |
| 21 |
id: integration.id, |
| 22 |
icon: integration?.icon || '', |
| 23 |
isViewFormHidden: integration?.isViewFormHidden || true, |
| 24 |
isEditFormHidden: integration?.isEditFormHidden || false |
| 25 |
}); |
| 26 |
|