Get post / page ID from ACF Link field
I'm trying to recieve post ID from link using ACF link field:
?php
$link = get_sub_field('offer_link');
$id = get_the_ID();
if( $link ): ?
a href="#post-?php echo $id; ?" target="?php echo $link['target']; ?"?php echo $link['title']; ?/a
?php endif; ?
but instead of ID of link I get the ID of current page. How should it be done?