"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("prop-types"),r=require("../../Attachment/index.js"),i=require("react/jsx-runtime");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(e),u=n(t);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var c=function(e){var t=e.feedItem.context.completion_document.data,n=t.display_name,a=t.file_name,u=t.size,s=t.signed_url,c=s?{attachmentUrl:s}:{fileName:a};return i.jsx(r,o(o({},c),{},{attachmentSize:u,displayName:n,size:"medium"}))};c.propTypes={feedItem:u.default.shape({context:u.default.shape({completion_document:u.default.shape({data:u.default.shape({display_name:u.default.string.isRequired,file_name:u.default.string.isRequired,size:u.default.number,signed_url:u.default.string}).isRequired}).isRequired}).isRequired}).isRequired},module.exports=c;
