"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactQuery = require("@tanstack/react-query");
var _tsSdkReactNative = require("@amityco/ts-sdk-react-native");
const useFile = fileId => {
  const {
    data
  } = (0, _reactQuery.useQuery)({
    queryKey: ['asc-uikit', 'FileRepository', 'getFile', fileId],
    queryFn: () => _tsSdkReactNative.FileRepository.getFile(fileId),
    enabled: !!fileId,
    select: response => response.data
  });
  return data;
};
var _default = exports.default = useFile;
//# sourceMappingURL=useFile.js.map