import { EnumType } from 'json-to-graphql-query';

export const stationsRequest = {
  _azs: {
    records: {
      _name: true,
      _opisanie: true,
      _adress: true,
      _chasyRaboty: {
        name: true,
      },
      _lat: true,
      _long: true,
      _avtomojka: true,
      _dtCopy: true, // ai92
      _ai92Copy: true, // ai95
      _ai95Copy: true, // z100
      _z100Copy: true, // propan
      _propanCopy: true, // electricCharge
      _zaryadnayaStanci: true, // miniMarket
      _miniMarketCop: true, // toilet
      _region: {
        name: true,
      },
      _foto: {
        url: true,
      },
    },
  },
};

export const stationsWithImageRequest = {
  _azs: {
    __args: {
      filtersSet: {
        conjunction: new EnumType('and'),
        filtersSet: [
          {
            field: new EnumType('_foto'),
            operator: 'isNotEmpty',
            value: [],
          },
        ],
      },
    },

    records: {
      _name: true,
      _opisanie: true,
      _adress: true,
      _chasyRaboty: {
        name: true,
      },
      _lat: true,
      _long: true,
      _avtomojka: true,
      _dtCopy: true, // ai92
      _ai92Copy: true, // ai95
      _ai95Copy: true, // z100
      _z100Copy: true, // propan
      _propanCopy: true, // electricCharge
      _zaryadnayaStanci: true, // miniMarket
      _miniMarketCop: true, // toilet
      _region: {
        name: true,
      },
      _foto: {
        url: true,
      },
    },
  },
};

export const partnersRequest = {
  _partners: {
    records: {
      _name: true,
      _image: {
        url: true,
      },
    },
  },
};

export const jobsRequest = {
  _vacancies: {
    records: {
      _name: true,
      _tags: {
        name: true,
      },
      _type: {
        name: true,
      },
      _localtio: {
        name: true,
      },
    },
  },
};

export const discountsRequest = {
  _akcii: {
    records: {
      _name: true,
      _opisanie: true,
      _do: true,
      _foto: {
        url: true,
      },
    },
  },
};

export const textsRequest = {
  _kontentSajta: {
    records: {
      _name: true,
      _znachenie: true,
    },
  },
};

export const teamRequest = {
  _komanda: {
    records: {
      _foto: {
        url: true,
      },
      _zvanie: true,
      _name: true,
    },
  },
};

export const historyRequest = {
  _istoriya: {
    records: {
      _name: true,
      _god: true,
      _opisanie: true,
    },
  },
};

export const reviewsRequest = {
  _otzyvy: {
    records: {
      id: true,
      _name: true,
      _otzyv: true,
      _rejting: true,
    },
  },
};
