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 Fast2sms Interface (Clean & concise)
export interface IFast2smsBase {
  name: string;
  fast2smsStatus: string;
  status: Status;
  templateId: string;
  companyId: Types.ObjectId;
  message: string;
  variableCount: number;
  isDefault: boolean;
  triggerPoint: string;
}

export interface IFast2sms extends IFast2smsBase, AuditFields {}

export interface IFast2smsDoc extends IFast2sms, Document {}

export interface IFast2smsModel extends IPaginateModel<IFast2smsDoc> {
  isFast2smsNameTaken(name: string): Promise<boolean>;
}

interface IFast2smsTemplate {
  sender_id: string;
  message: string;
  approved_message: string;
  variable_count: number;
  variable_values: string;
  overall_url: string;
  dlt_content_template_id: string;
}

export interface Fast2smsRow {
  templates: IFast2smsTemplate[];
}
