import{useState as e,useEffect as t}from"react";let useLiteVimeoEmbed=(i,m)=>{let[o,r]=e(),[s,a]=e(!i);t(()=>{fetch(`https://vimeo.com/api/v2/video/${m}.json`).then(e=>e.json()).then(([e])=>{r(e?.thumbnail_large)})},[m]);let l=()=>{s||a(!0)};return{addIframe:l,thumbnail:o,iframe:s}};export{useLiteVimeoEmbed as default,useLiteVimeoEmbed};
