props; $viewId = $props['view_id']; $isPreview = $this->props['preview']; $imgPath = $props['img_path']; $messages = $props['messages']; $classes = $props['classes']; $aiAvatar = $this->props['ai_avatar']; $aiName = $this->props['ai_name']; $userAvatar = $this->props['user_avatar']; $userName = $this->props['user_name']; $data = $this->props['data']; $desktop = WaicUtils::getArrayValue($data, 'desktop', array(), 2); $mobile = WaicUtils::getArrayValue($data, 'mobile', array(), 2); $aiStatus = WaicUtils::getArrayValue($data, 'ai_status'); $addSelector = '#waic-' . $props['view_id']; $viewMode = $this->props['view_mode']; $modes = array(''); if ($this->existCustomCss('mobile')) { $this->setCustomCss('.waic-mobile', 'display', 'block', 'mobile'); $this->setCustomCss('.waic-desktop', 'display', 'none', 'mobile'); } if (!empty($viewMode)) { if ('mobile' == $viewMode) { $modes = array('', 'mobile'); //$this->setCustomCss('.waic-mobile', 'display', 'block', 'mobile'); //$this->setCustomCss('.waic-desktop', 'display', 'none', 'mobile'); $data['desktop'] = $data['mobile']; unset($data['mobile']); } else { $modes = array('', 'desktop'); } } $customCss = $this->getCustomCssString($modes, $addSelector); $mobileFull = false; if (empty($viewMode)) { if (isset($classes['wrapper']) && in_array('waic-full-mobile', $classes['wrapper'])) { $this->setCustomCss('.waic-full-show', 'left', '0', 'mobile'); $this->setCustomCss('.waic-full-show', 'top', '0', 'mobile'); $this->setCustomCss('.waic-full-show', 'width', '100%', 'mobile'); $this->setCustomCss('.waic-full-show', 'height', '10000px', 'mobile'); $this->setCustomCss('.waic-full-show', 'max-height', '100%', 'mobile'); $this->setCustomCss('.waic-full-show', 'z-index', '100000', 'mobile'); $this->setCustomCss('.waic-full-show .waic-chatbot-panel', 'width', '100%', 'mobile'); $this->setCustomCss('.waic-full-show .waic-chatbot-panel', 'height', '10000px', 'mobile'); $this->setCustomCss('.waic-full-show .waic-chatbot-panel', 'max-height', '100%', 'mobile'); $this->setCustomCss('.waic-full-show .waic-chatbot-panel', 'border-radius', '0', 'mobile'); $mobileFull = true; } if ($this->existCustomCss('desktop')) { $customCss .= '@media screen and (min-width: ' . $this->props['breakpoint'] . 'px) {' . $this->getCustomCssString(array('desktop'), $addSelector) . '}'; } if ($this->existCustomCss('mobile')) { //$this->setCustomCss('.waic-mobile', 'display', 'block', 'mobile'); //$this->setCustomCss('.waic-desktop', 'display', 'none', 'mobile'); $customCss .= '@media screen and (max-width: ' . $this->props['breakpoint'] . 'px) {' . $this->getCustomCssString(array('mobile'), $addSelector) . '}'; } } //WaicUtils::getArrayValue($desktop, 'header_close', 'minus'); /*$css = $this->props['css']; $customCss = $this->props['custom_css'] . ( empty($css['desktop']) ? '' : $css['desktop'] ); if (!empty($css['mobile'])) { $customCss .= '@media screen and (max-width: ' . $this->props['breakpoint'] . 'px) {' . $css['mobile'] . '.waic-mobile {display: block;} .waic-desktop {display: none;}' . '}'; }*/ if (!empty($customCss)) { ?>
'; ?>
>
>