import e from"@babel/runtime/helpers/defineProperty";import t from"prop-types";import r from"../../Attachment/index.js";import{jsx as i}from"react/jsx-runtime";function n(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(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?n(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var s=function(e){var t=e.feedItem.context.document.data,n=t.display_name,s=t.file_name,a=t.size,p=t.signed_url;return i(r,o(o({},p?{attachmentUrl:p}:{fileName:s}),{},{attachmentSize:a,displayName:n,size:"medium"}))};s.propTypes={feedItem:t.shape({context:t.shape({document:t.shape({data:t.shape({display_name:t.string.isRequired,file_name:t.string.isRequired,size:t.number,signed_url:t.string}).isRequired}).isRequired}).isRequired}).isRequired};export{s as default};
