scopeConfig->isSetFlag(self::BASE . 'general/enabled'); } public function getApiUrl(): string { return rtrim((string)$this->scopeConfig->getValue(self::BASE . 'general/api_url'), '/'); } public function getApiKey(): string { $value = (string)$this->scopeConfig->getValue(self::BASE . 'general/api_key'); return $value !== '' ? (string)$this->encryptor->decrypt($value) : ''; } public function getBatchSize(): int { return min(40, max(1, (int)$this->scopeConfig->getValue(self::BASE . 'sync/batch_size'))); } public function shouldAutoReceive(): bool { return $this->scopeConfig->isSetFlag(self::BASE . 'sync/auto_receive'); } public function isWidgetEnabled(): bool { return $this->scopeConfig->isSetFlag(self::BASE . 'widget/enabled'); } public function getWidgetHeight(): int { return min(800, max(200, (int)$this->scopeConfig->getValue(self::BASE . 'widget/height'))); } }