import { Document, Types } from 'mongoose';

import { IPaginateModel } from '@/shared/interfaces/model.interface';
import { AuditFields } from '@/shared/types/common';
import { Status } from '@/shared/constants/enum.constant';

// Base Whatsapp Interface (Clean & concise)
export interface IWhatsappBase {
  name: string;
  whatsappStatus: string;
  status: Status;
  templateId: string;
  companyId: Types.ObjectId;
  headerText: string;
  bodyText: string;
  isDefault: boolean;
  triggerPoint: string;
}

export interface IWhatsapp extends IWhatsappBase, AuditFields {}

export interface IWhatsappDoc extends IWhatsapp, Document {}

export interface IWhatsappModel extends IPaginateModel<IWhatsappDoc> {
  isWhatsappNameTaken(name: string): Promise<boolean>;
}
