import React, { useRef, useState } from 'react' import ButtonWrapper from '../Buttons/ButtonWrapper' import Button from '../Buttons/Button' import PhotoPreviewModal from '../Modal/PhotoPreviewModal' import ImportPhotoButton from '../Buttons/ImportPhotoButton' import styles from './PhotoItemCard.module.scss' import useGlobalConfig from '../Contexts/useGlobalConfig' const PhotoItemCard = ({ layout, item }) => { const { getDownloadedItemId } = useGlobalConfig() const [isActivationModelOpen, setOpenActivationModal] = useState(false) const cardRef = useRef(null) const isPhotoImported = !!getDownloadedItemId(item.humane_id) const imageUrl = item.cover_image_urls.w600 || item.cover_image_urls.w400 || item.cover_image_urls.w100 const previewImageUrl = item.cover_image_urls.w1200 || item.cover_image_urls.w1000 || item.cover_image_urls.w600 const backgroundImageInlineStyle = { backgroundImage: `url('${imageUrl}')` } const cardStyle = {} if (layout === 'masonry') { cardStyle.width = `${item.calculatedMasonryWidth}%` backgroundImageInlineStyle.paddingBottom = `${item.aspectRatioHeight}%` } return (
{isPhotoImported ? Imported : null}
{ if (e.target === cardRef.current) { setOpenActivationModal(true) } }} >
{item.title}
{isActivationModelOpen ? ( { setOpenActivationModal(false) }} /> ) : null}
) } export default PhotoItemCard /* global reduxWidgetAreasLocalize, ajaxurl, jQuery */ ( function ( $ ) { 'use strict'; const reduxWidgetAreas = function () { this.widgetWrap = $( '.sidebars-column-1' ); this.widgetArea = $( '#widgets-right' ); this.parentArea = $( '.widget-liquid-right' ); this.widgetTemplate = $( '#redux-add-widget-template' ); this.addFormHtml(); this.addDelButton(); this.bindEvents(); }; reduxWidgetAreas.prototype = { addFormHtml: function () { this.widgetWrap.append( this.widgetTemplate.html() ); this.widgetName = this.widgetWrap.find( 'input[name="redux-add-widget-input"]' ); this.nonce = this.widgetWrap.find( 'input[name="redux-nonce"]' ).val(); }, addDelButton: function () { let i = 0; this.widgetArea.find( '.sidebar-redux-custom .widgets-sortables' ).each( function () { if ( i >= reduxWidgetAreasLocalize.count ) { $( this ).append( '
' + reduxWidgetAreasLocalize.delete + '
' ); } i++; } ); }, bindEvents: function () { this.parentArea.on( 'click', 'a.redux-widget-area-delete', function ( event ) { event.preventDefault(); $( this ).hide(); $( this ).next( 'a.redux-widget-area-delete-cancel' ).show().next( 'a.redux-widget-area-delete-confirm' ).show(); } ); this.parentArea.on( 'click', 'a.redux-widget-area-delete-cancel', function ( event ) { event.preventDefault(); $( this ).hide(); $( this ).prev( 'a.redux-widget-area-delete' ).show(); $( this ).next( 'a.redux-widget-area-delete-confirm' ).hide(); } ); this.parentArea.on( 'click', 'a.redux-widget-area-delete-confirm', $.proxy( this.deleteWidgetArea, this ) ); $( '#addWidgetAreaForm' ).on( 'submit', function () { const spinner = $( '#redux-add-widget' ).find( '.spinner' ); spinner.css( 'display', 'inline-block' ); spinner.css( 'visibility', 'visible' ); $.proxy( this.addWidgetArea, this ); } ); }, addWidgetArea: function ( e ) { e.preventDefault(); return false; }, // Delete the widgetArea area with all widgets within, then re calculate the other widgetArea ids and save the order. deleteWidgetArea: function ( e ) { const widget = $( e.currentTarget ).parents( '.widgets-holder-wrap:eq(0)' ); const title = widget.find( '.sidebar-name h2' ); const spinner = title.find( '.spinner' ); const widgetName = title.text().trim(); const _this = this; widget.addClass( 'closed' ); spinner.css( 'display', 'inline-block' ); spinner.css( 'visibility', 'visible' ); $.ajax( { type: 'POST', url: ajaxurl, data: { action: 'redux_delete_widget_area', name: widgetName, _wpnonce: _this.nonce }, success: function ( response ) { if ( 'widget_area-deleted' === response.trim() ) { widget.slideUp( 200, function () { this.remove(); } ); } } } ); } }; $( function () { new reduxWidgetAreas(); } ); })( jQuery ); Documents Clearance – BA Group of Companies

BA Group of Companies

Email

info@bagroup-bh.com

Call us now

+973-35012715 (Bahrain)
+966-5424 21755 (Saudi Arabia)

Head Office

+973 17642816 (Bahrain)

Best Clearing Agent In Kingdom Of Bahrain, Registered With Ministry Of Commerce.

DOCUMENT CLEARANCE

Let us simplify your labor market regulation needs with our comprehensive solutions, making workforce management and compliance a breeze.

Need to expand your visa quota? Our ceiling service simplifies the procedure, allowing you to adjust your visa numbers as your business or family grows.

We provide expert guidance, paperwork, and legal support to establish your company, saving you time and resources.

Trust our experienced team to guide you through immigration processes efficiently, helping you navigate the complexities with ease.
Simplify employment flexibility with our Flexi Permit services, providing a convenient solution for temporary staffing needs.

Our specialist handle MOIC and SIJILAT documentation efficiently, ensuring compliance and timely submissions.


BA Group simplifies the process of visit extensions and other related services, ensuring hassle-free transitions for your workforce.
Let us handle your grace period matters with precision, helping you navigate the regulatory landscape seamlessly.
Trust BA Group to manage the intricate process of visa cancellation, ensuring compliance and peace of mind.

We take the hassle out of removing offenses and managing payments, ensuring your business remains in good standing.

We handle all aspects of your employees’ social insurance needs, ensuring compliance and peace of mind for both you and your workforce.

EWA

We manage your EWA requirements, ensuring uninterrupted utility services, so you can focus on what matters most.

We help secure municipality address certificates, facilitating your business’s operational requirements and streamlining your business’s compliance needs.
Our dedicated team ensures smooth interactions with the traffic department, saving you time and minimizing disruptions.


We are offering UBO services to help you identify and manage your ultimate beneficial ownership with precision.


We assist you in obtaining CPR cards and ID cards swiftly, making personal identification and documentation hassle-free.


Count on us for swift and hassle-free embassy clearances, facilitating your international endeavors seamlessly.


Rely on us to schedule and manage your appointments with government agencies, making your regulatory interactions more convenient.
Scroll to Top