import { defineStore } from 'pinia';

export const usePrinterStore = defineStore('printer', {
  state() {
    return {
      sessionPrint: {
        active: true,
        content: '',
        position: 'bottom-right',
        x: 100,
        y: 100,
        fontSize: 12,
        isBold: true,
        isPagging: true,
        isTimestamp: true,
      },
      saveFilePrint: false,
      listPosition: [
        { value: 'top-left', label: 'POSITION_TOP_LEFT', emoji: '↖️' },
        { value: 'top-center', label: 'POSITION_TOP_CENTER', emoji: '⬆️' },
        { value: 'top-right', label: 'POSITION_TOP_RIGHT', emoji: '↗️' },
        { value: 'middle-left', label: 'POSITION_MIDDLE_LEFT', emoji: '⬅️' },
        { value: 'middle-center', label: 'POSITION_MIDDLE_CENTER', emoji: '⏺️' },
        { value: 'middle-right', label: 'POSITION_MIDDLE_RIGHT', emoji: '➡️' },
        { value: 'bottom-left', label: 'POSITION_BOTTOM_LEFT', emoji: '↙️' },
        { value: 'bottom-center', label: 'POSITION_BOTTOM_CENTER', emoji: '⬇️' },
        { value: 'bottom-right', label: 'POSITION_BOTTOM_RIGHT', emoji: '↘️' },
        { value: 'custom', label: 'POSITION_CUSTOM', emoji: '✏️' },
      ],
    };
  },
  persist: {
    enabled: true,
    key: 'pinia-persist-printer',
  },
});
